Code

Adressbook undefined vars
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 20 May 2005 13:19:34 +0000 (13:19 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 20 May 2005 13:19:34 +0000 (13:19 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@289 594d385d-05f5-0310-b6e9-bd551577e9d8

include/setup_checks.inc
plugins/addons/addressbook/class_addressbook.inc

index 7003058e8281d57a5d69f7742948066ede4158fa..555b3593c864f00aee628b69e5b565a1cd598f8c 100644 (file)
@@ -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)
index e5e077eecee85138034dedb41a433d202f2e8fbb..461cb574a21fdbf48f58ba50adee421b7c0cb2f6 100644 (file)
@@ -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]) ||