Fix address lookup.
authorRaphaël Barrois <raphael.barrois@polytechnique.org>
Sun, 17 Feb 2013 23:34:30 +0000 (00:34 +0100)
committerRaphaël Barrois <raphael.barrois@polytechnique.org>
Sun, 17 Feb 2013 23:34:30 +0000 (00:34 +0100)
- Remove extra arg causing parameter shift
- Don't override passed in flags

Signed-off-by: Raphaël Barrois <raphael.barrois@polytechnique.org>
classes/userfilter/conditions.inc.php

index 0f1f95f..7ea27f4 100644 (file)
@@ -1101,20 +1101,18 @@ class UFC_AddressComponent extends UFC_Address
     private $fieldtype;
     private $exact;
 
-    public function __construct($val, $fieldtype, $exact = true, $type = null, $flags = self::FLAG_ANY)
+    public function __construct($val, $fieldtype, $type = null, $flags = self::FLAG_ANY)
     {
         if (!in_array($fieldtype, self::$components)) {
             Platal::page()->killError('Invalid address field type: ' . $this->fieldtype);
         }
 
-        $flags = self::FLAG_ANY;
         parent::__construct($type, $flags);
         if (!is_array($val)) {
             $val = array($val);
         }
         $this->val       = $val;
         $this->fieldtype = $fieldtype;
-        $this->exact     = $exact;
     }
 
     public function buildCondition(PlFilter $uf)