Merge branch 'xorg/maint'
[platal.git] / classes / userfilter / conditions.inc.php
index a3faa35..2ad8d1d 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2011 Polytechnique.org                              *
+ *  Copyright (C) 2003-2014 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
@@ -1028,14 +1028,16 @@ abstract class UFC_Address extends UserFilterCondition
 
     /** Flags for addresses
      */
+    const FLAG_NONE    = 0x0000;
     const FLAG_CURRENT = 0x0001;
     const FLAG_TEMP    = 0x0002;
     const FLAG_SECOND  = 0x0004;
     const FLAG_MAIL    = 0x0008;
     const FLAG_CEDEX   = 0x0010;
+    const FLAG_AX_MAIL = 0x0020;
 
     // Binary OR of those flags
-    const FLAG_ANY     = 0x001F;
+    const FLAG_ANY     = 0x003F;
 
     /** Text of these flags
      */
@@ -1045,6 +1047,7 @@ abstract class UFC_Address extends UserFilterCondition
         self::FLAG_SECOND  => 'secondary',
         self::FLAG_MAIL    => 'mail',
         self::FLAG_CEDEX   => 'cedex',
+        self::FLAG_AX_MAIL => 'ax_mail',
     );
 
     protected $flags;
@@ -1098,7 +1101,7 @@ 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);
@@ -1110,7 +1113,6 @@ class UFC_AddressComponent extends UFC_Address
         }
         $this->val       = $val;
         $this->fieldtype = $fieldtype;
-        $this->exact     = $exact;
     }
 
     public function buildCondition(PlFilter $uf)
@@ -1719,5 +1721,5 @@ class UFC_PartnerSharingID extends UserFilterCondition
 }
 // }}}
 
-// vim:set et sw=4 sts=4 sws=4 foldmethod=marker enc=utf-8:
+// vim:set et sw=4 sts=4 sws=4 foldmethod=marker fenc=utf-8:
 ?>