From: Michael M Slusarz Date: Thu, 2 Apr 2009 14:57:56 +0000 (-0600) Subject: Flags should be lowercase; pass 'type' information. X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=d39a5556f14509d777a7aa635e149e335fc96aaa;p=horde.git Flags should be lowercase; pass 'type' information. --- diff --git a/imp/lib/Imap/Flags.php b/imp/lib/Imap/Flags.php index bca35ebba..ff7761acb 100644 --- a/imp/lib/Imap/Flags.php +++ b/imp/lib/Imap/Flags.php @@ -14,7 +14,7 @@ class IMP_Imap_Flags { /* IMAP flag prefix for IMP-specific flags. */ - const PREFIX = '$IMPFlag'; + const PREFIX = '$impflag'; /** * Singleton instance. @@ -138,7 +138,9 @@ class IMP_Imap_Flags $this->_flags = json_decode($GLOBALS['prefs']->getValue('msgflags'), true); /* Sanity checking. */ - if (!is_array($this->_flags)) { + if (is_array($this->_flags)) { + $this->_flags = array_change_key_case($this->_flags, CASE_LOWER); + } else { $this->_flags = array(); $this->_save(); } @@ -251,6 +253,7 @@ class IMP_Imap_Flags * 'div' - (string) A DIV HTML element, if 'div' option is true and a * classname is defined. * 'label' - (string) The label of the flag. + * 'type' - (string) The flag type. * */ public function parse($options = array()) @@ -324,7 +327,8 @@ class IMP_Imap_Flags $tmp = array( 'bg' => isset($val['b']) ? $val['b'] : $def_color, 'flag' => $key, - 'label' => $val['l'] + 'label' => $val['l'], + 'type' => $val['t'] ); if (isset($val['a'])) {