Rewrite FlagSet in order to run flag operation in constant time.
[platal.git] / include / emails.inc.php
index bcf0cc4..f9c131a 100644 (file)
@@ -264,7 +264,7 @@ class EmailStorage extends Email
     // Shortname to realname mapping for known mail storage backends.
     private $display_names = array(
         'imap'       => 'Accès de secours aux emails (IMAP)',
-        'googleapps' => 'Compte GMail / Google Apps',
+        'googleapps' => 'Compte Google Apps',
     );
 
     // Retrieves the current list of actives storages.
@@ -273,7 +273,7 @@ class EmailStorage extends Email
         $res = XDB::query("SELECT  mail_storage
                              FROM  auth_user_md5
                             WHERE  user_id = {?}", $this->uid);
-        return new FlagSet($res->fetchOneCell());
+        return new PlFlagSet($res->fetchOneCell());
     }
 
     // Updates the list of active storages.
@@ -281,7 +281,7 @@ class EmailStorage extends Email
     {
         XDB::execute("UPDATE  auth_user_md5
                          SET  mail_storage = {?}
-                       WHERE  user_id = {?}", $storages->flags(), $this->uid);
+                       WHERE  user_id = {?}", $storages, $this->uid);
     }
 
     // Returns the list of allowed storages for the @p user.