index : archweb32 | |
Archlinux32 website | gitolite user |
summaryrefslogtreecommitdiff |
-rw-r--r-- | lib/helper.php | 7 |
diff --git a/lib/helper.php b/lib/helper.php index ffa5943..84cb69c 100644 --- a/lib/helper.php +++ b/lib/helper.php @@ -162,3 +162,10 @@ function git_url($repository,$type,$commit,$path,$line = null,$commit_is_hash = } }; }; + +function if_unset($array, $index, $default) { + if (isset($array[$index])) + return $array[$index]; + else + return $default; +}; |