LSsearch : Added initial check of predefinedFilters validity/syntax before use.
authorBenjamin Renard <brenard@easter-eggs.com>
Wed, 3 Feb 2010 02:09:23 +0000 (03:09 +0100)
committerBenjamin Renard <brenard@easter-eggs.com>
Wed, 3 Feb 2010 02:09:23 +0000 (03:09 +0100)
public_html/includes/class/class.LSsearch.php

index 44dd42e..e575a25 100644 (file)
@@ -121,6 +121,13 @@ class LSsearch {
    */
   private function loadConfig() {
     $this -> config = LSconfig::get("LSobjects.".$this -> LSobject.".LSsearch");
+    if (is_array($this -> config['predefinedFilters'])) {
+      foreach(array_keys($this -> config['predefinedFilters']) as $key) {
+        if(!LSldap::isValidFilter($key)) {
+          unset($this -> config['predefinedFilters'][$key]);
+        }
+      }
+    }
   }
   
   /**