diff options
author | alecpl <alec@alec.pl> | 2012-01-19 12:25:39 +0000 |
---|---|---|
committer | alecpl <alec@alec.pl> | 2012-01-19 12:25:39 +0000 |
commit | 63ff2a22cadc29b2fdba54a5bf3fc32c86fa070e (patch) | |
tree | a1ce0329987473a5a97ffae72635ded8bd2a2303 | |
parent | a19d90043e996b3a8e95a6e3fd5c734c5f2ce551 (diff) |
- Fix warning when default_folders setting is not an array
-rw-r--r-- | program/steps/settings/func.inc | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/program/steps/settings/func.inc b/program/steps/settings/func.inc index ec3afc402..18a466020 100644 --- a/program/steps/settings/func.inc +++ b/program/steps/settings/func.inc @@ -865,12 +865,15 @@ function rcmail_folder_options($mailbox) */ function rcmail_update_folder_row($name, $oldname=null, $subscribe=false, $class_name=null) { - global $RCMAIL, $CONFIG, $OUTPUT; + global $RCMAIL, $OUTPUT; + + $default_folders = (array) $RCMAIL->config->get('default_folders'); + $protect_folders = $RCMAIL->config->get('protect_default_folders'); $storage = $RCMAIL->get_storage(); $delimiter = $storage->get_hierarchy_delimiter(); $name_utf8 = rcube_charset_convert($name, 'UTF7-IMAP'); - $protected = ($CONFIG['protect_default_folders'] == true && in_array($name, $CONFIG['default_folders'])); + $protected = $protect_folders && in_array($name, $default_folders); $foldersplit = explode($delimiter, $storage->mod_folder($name)); $level = count($foldersplit) - 1; |