From 63ff2a22cadc29b2fdba54a5bf3fc32c86fa070e Mon Sep 17 00:00:00 2001 From: alecpl Date: Thu, 19 Jan 2012 12:25:39 +0000 Subject: - Fix warning when default_folders setting is not an array --- program/steps/settings/func.inc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'program/steps/settings') 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; -- cgit v1.2.3