1. added non anonymous ldap binding patch. (thanks to Ilyak Kasnacheev <ilyak at...
[squirrelmail.git] / functions / abook_database.php
index 0a2b09b6af97c119f26192bc5191e701c40f9693..8023f704026e85686c8c1f196b8e213c9453fd52 100644 (file)
@@ -74,6 +74,10 @@ class abook_database extends addressbook_backend {
                $this->writeable = $param['writeable'];
             }
 
+            if (isset($param['listing'])) {
+               $this->listing = $param['listing'];
+            }
+
             $this->open(true);
         }
         else {
@@ -121,7 +125,7 @@ class abook_database extends addressbook_backend {
         if(!$this->open()) {
             return false;
         }
-         
+
         /* To be replaced by advanded search expression parsing */
         if (is_array($expr)) {
             return;
@@ -197,6 +201,11 @@ class abook_database extends addressbook_backend {
         if (!$this->open()) {
             return false;
         }
+       
+       if(!$this->listing) {
+           return array();
+       }
+
 
         $query = sprintf("SELECT * FROM %s WHERE owner='%s'",
                          $this->table, $this->owner);