summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 5cf3014)
raw | patch | inline | side by side (parent: 5cf3014)
author | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 30 Oct 2008 16:10:17 +0000 (16:10 +0000) | ||
committer | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 30 Oct 2008 16:10:17 +0000 (16:10 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@12835 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-core/include/functions.inc | patch | blob | history |
index 562a48f60f79069d4c4d1c583926089965e217bf..ca6b487f5607320c299bf5ca827bedfd9ae69746 100644 (file)
function in_array_ics($value, $items)
{
- if (!is_array($items)){
- return (FALSE);
- }
-
- foreach ($items as $item){
- if (strcasecmp($item, $value) == 0) {
- return (TRUE);
- }
- }
-
- return (FALSE);
-}
+ return preg_grep('/^'.preg_quote($value, '/').'$/i', $items);
+}
function generate_alphabet($count= 10)