From: cajus Date: Mon, 24 Sep 2007 09:56:05 +0000 (+0000) Subject: Fixed wrong if results with strcasecmp X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=b1d61dc7808b58c32a70dc53aeb84c693847cb5d;p=gosa.git Fixed wrong if results with strcasecmp git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@7387 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/include/class_config.inc b/include/class_config.inc index 3fdc372c3..036872656 100644 --- a/include/class_config.inc +++ b/include/class_config.inc @@ -757,7 +757,7 @@ class config { $return= strtoupper($return); if (is_array($arr)){ foreach ($arr as &$a){ - if (isset($a['CLASS']) && strcasecmp($name, $a['CLASS'])){ + if (isset($a['CLASS']) && strcasecmp($name, $a['CLASS']) == 0){ return(isset($a[$return])?$a[$return]:""); } else { $res= $this->__search ($a, $name, $return); diff --git a/include/functions.inc b/include/functions.inc index 425bcaa73..8e2de5bdd 100644 --- a/include/functions.inc +++ b/include/functions.inc @@ -1687,7 +1687,7 @@ function in_array_ics($value, $items) } foreach ($items as $item){ - if (strcasecmp($item, $value)) { + if (strcasecmp($item, $value) == 0) { return (TRUE); } }