adding ldap listing controls to conf.pl
[squirrelmail.git] / functions / abook_database.php
index 2a491577c1047815751df3069f531d883a9bd092..7a386e7c59f001993545e1cb98697f4ebc0b4bee 100644 (file)
@@ -190,6 +190,10 @@ class abook_database extends addressbook_backend {
             return;
         }
 
+        // don't allow wide search when listing is disabled.
+        if ($expr=='*' && ! $this->listing)
+            return array();
+
         /* Make regexp from glob'ed expression  */
         $expr = str_replace('?', '_', $expr);
         $expr = str_replace('*', '%', $expr);