summaryrefslogtreecommitdiff
path: root/program/steps/settings/func.inc
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2012-01-19 12:25:39 +0000
committeralecpl <alec@alec.pl>2012-01-19 12:25:39 +0000
commit63ff2a22cadc29b2fdba54a5bf3fc32c86fa070e (patch)
treea1ce0329987473a5a97ffae72635ded8bd2a2303 /program/steps/settings/func.inc
parenta19d90043e996b3a8e95a6e3fd5c734c5f2ce551 (diff)
- Fix warning when default_folders setting is not an array
Diffstat (limited to 'program/steps/settings/func.inc')
-rw-r--r--program/steps/settings/func.inc7
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;