summaryrefslogtreecommitdiff
path: root/roundcubemail/program/steps/settings/func.inc
diff options
context:
space:
mode:
authoralec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>2012-01-19 12:25:39 +0000
committeralec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>2012-01-19 12:25:39 +0000
commitcfc858a30e66776312b3f0713b68a25afcfc4569 (patch)
treeb991deb87d9be223b7d64a71ea38a90dc3f1de86 /roundcubemail/program/steps/settings/func.inc
parentaac5a08c0355ccf52ab5fc3911a2bc5789e247ac (diff)
- Fix warning when default_folders setting is not an array
git-svn-id: https://svn.roundcube.net/trunk@5804 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/steps/settings/func.inc')
-rw-r--r--roundcubemail/program/steps/settings/func.inc7
1 files changed, 5 insertions, 2 deletions
diff --git a/roundcubemail/program/steps/settings/func.inc b/roundcubemail/program/steps/settings/func.inc
index ec3afc402..18a466020 100644
--- a/roundcubemail/program/steps/settings/func.inc
+++ b/roundcubemail/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;