An empty UserFilterBuilder should return a PFC_True() instead of an empty PFC_And...
authorRaphaël Barrois <raphael.barrois@polytechnique.org>
Mon, 31 Jan 2011 23:40:59 +0000 (00:40 +0100)
committerRaphaël Barrois <raphael.barrois@polytechnique.org>
Mon, 31 Jan 2011 23:41:05 +0000 (00:41 +0100)
Signed-off-by: Raphaël Barrois <raphael.barrois@polytechnique.org>
include/ufbuilder.inc.php

index 2c39237..c4b8797 100644 (file)
@@ -183,7 +183,11 @@ class UserFilterBuilder
     {
         $this->buildUFC();
         if ($this->valid) {
-            return $this->ufc;
+            if ($this->isEmpty()) {
+                return new PFC_True();
+            } else {
+                return $this->ufc;
+            }
         } else {
             return new PFC_False();
         }