From d8f49eeeb83939499251b846f8122a64c2fe5a3f Mon Sep 17 00:00:00 2001 From: thomasb Date: Tue, 15 Jul 2008 16:48:20 +0000 Subject: Check PERMANENTFLAGS before saving MDNSent flag (#1484963, #1485163) git-svn-id: https://svn.roundcube.net/trunk@1590 208e9e7b-5314-0410-a742-e7e81cd9613c --- roundcubemail/program/include/rcube_imap.php | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'roundcubemail/program/include/rcube_imap.php') diff --git a/roundcubemail/program/include/rcube_imap.php b/roundcubemail/program/include/rcube_imap.php index 395a1b3af..3daea0c06 100644 --- a/roundcubemail/program/include/rcube_imap.php +++ b/roundcubemail/program/include/rcube_imap.php @@ -345,6 +345,21 @@ class rcube_imap } + /** + * Checks the PERMANENTFLAGS capability of the current mailbox + * and returns true if the given flag is supported by the IMAP server + * + * @param string Permanentflag name + * @return mixed True if this flag is supported + * @access public + */ + function check_permflag($flag) + { + $flagsmap = $GLOBALS['IMAP_FLAGS']; + return (($imap_flag = $flagsmap[strtoupper($flag)]) && in_array_nocase($imap_flag, $this->conn->permanentflags)); + } + + /** * Returns the delimiter that is used by the IMAP server for folder separation * -- cgit v1.2.3