From: hickert Date: Fri, 20 May 2005 13:19:34 +0000 (+0000) Subject: Adressbook undefined vars X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=0a0107d85b5439a3a2741a7d01d3652219c40b0b;p=gosa.git Adressbook undefined vars git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@289 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/include/setup_checks.inc b/include/setup_checks.inc index 7003058e8..555b3593c 100644 --- a/include/setup_checks.inc +++ b/include/setup_checks.inc @@ -15,15 +15,19 @@ function minimum_version($vercheck) for($i=0; $i < $c1 ; $i++) { + // no success if($needver[$i] > $curver[$i]) { return(false); } + // current ist higher if($needver[$i] < $curver[$i]) { return(true); } + // Number is Equal } + return (true); } function minimum_versioni2($vercheck) diff --git a/plugins/addons/addressbook/class_addressbook.inc b/plugins/addons/addressbook/class_addressbook.inc index e5e077eec..461cb574a 100644 --- a/plugins/addons/addressbook/class_addressbook.inc +++ b/plugins/addons/addressbook/class_addressbook.inc @@ -70,6 +70,10 @@ class addressbook extends plugin { $smarty= get_smarty(); + #! Hickert + /*prevent empty variables for smarty*/ + foreach($this->attributes as $atr) $smarty->assign($atr,""); + /* Save formular information */ $phonefilter= get_global("phonefilter"); foreach( array("search_for", "search_base", "object_type") as $type){ @@ -322,9 +326,22 @@ class addressbook extends plugin first is too much overhead. */ error_reporting(0); + + + /* Walk through LDAP results */ while ($attrs= $ldap->fetch()){ + #! hickert + /* prevent empty vaiables */ + foreach($this->attributes as $atr) { + if(!isset($attrs[$atr][0])) { + $attrs[$atr][0] = ""; + } + } + if(!isset($_GET['start'])) $_GET['start']=""; + + /* Only show lines that have set any mail or phone informations */ if (isset($attrs['telephoneNumber'][0]) || isset($attrs['facsimileTelephoneNumber'][0]) ||