Fix determination of settable IMAP flags
authorMichael M Slusarz <slusarz@curecanti.org>
Tue, 4 Aug 2009 06:55:47 +0000 (00:55 -0600)
committerMichael M Slusarz <slusarz@curecanti.org>
Tue, 4 Aug 2009 07:03:40 +0000 (01:03 -0600)
imp/lib/Imap/Flags.php

index 68db76f..700e2f7 100644 (file)
@@ -83,10 +83,9 @@ class IMP_Imap_Flags
         $this->_loadList();
 
         $def_color = $GLOBALS['prefs']->getValue('msgflags_color');
-        $ret = $this->_flags;
-        $avail_flags = array_keys($ret);
+        $avail_flags = array_keys($this->_flags);
 
-        $types = array();
+        $ret = $types = array();
         if (!empty($options['imap'])) {
             $types = array('imapp', 'imapu');
         }
@@ -103,6 +102,7 @@ class IMP_Imap_Flags
         }
 
         foreach ($avail_flags as $key) {
+            $ret[$key] = $this->_flags[$key];
             $ret[$key]['flag'] = $key;
 
             if (!empty($options['fgcolor'])) {