From: cajus Date: Mon, 24 Sep 2007 09:07:11 +0000 (+0000) Subject: * Added speed optimization for config searching (use str functions) X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=122cb2ba13155ad7431a403cb6013a7d666a3ddf;p=gosa.git * Added speed optimization for config searching (use str functions) * Added speed optimization for in_array_ics (use str functions) * Updated TODO git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@7384 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/TODO b/TODO index 2fda9c8a4..253674027 100644 --- a/TODO +++ b/TODO @@ -39,8 +39,6 @@ Target for 2.6: Target for 3.0: =============== -* Complete PHP5 compliance and optimization - * Simplify plugins by providing a schema parser * Replace PHP IMAP module by self made module diff --git a/include/class_config.inc b/include/class_config.inc index da6ca0432..3fdc372c3 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']) && preg_match("/^$name$/i", $a['CLASS'])){ + if (isset($a['CLASS']) && strcasecmp($name, $a['CLASS'])){ return(isset($a[$return])?$a[$return]:""); } else { $res= $this->__search ($a, $name, $return); diff --git a/include/functions.inc b/include/functions.inc index 506fa4b75..425bcaa73 100644 --- a/include/functions.inc +++ b/include/functions.inc @@ -1687,7 +1687,7 @@ function in_array_ics($value, $items) } foreach ($items as $item){ - if (strtolower($item) == strtolower($value)) { + if (strcasecmp($item, $value)) { return (TRUE); } }