summaryrefslogtreecommitdiff
path: root/program/steps/settings
diff options
context:
space:
mode:
Diffstat (limited to 'program/steps/settings')
-rw-r--r--program/steps/settings/folders.inc9
1 files changed, 6 insertions, 3 deletions
diff --git a/program/steps/settings/folders.inc b/program/steps/settings/folders.inc
index 6fc72d9ea..d82d8366b 100644
--- a/program/steps/settings/folders.inc
+++ b/program/steps/settings/folders.inc
@@ -186,7 +186,7 @@ if ($OUTPUT->ajax_call)
// build table with all folders listed by server
function rcube_subscription_form($attrib)
{
- global $RCMAIL, $CONFIG, $OUTPUT;
+ global $RCMAIL, $OUTPUT;
list($form_start, $form_end) = get_form_tags($attrib, 'folders');
unset($attrib['form']);
@@ -215,6 +215,9 @@ function rcube_subscription_form($attrib)
$seen = array();
$list_folders = array();
+ $default_folders = (array) $RCMAIL->config->get('default_folders');
+ $protect_default = $RCMAIL->config->get('protect_default_folders');
+
// pre-process folders list
foreach ($a_unsubscribed as $i => $folder) {
$folder_id = $folder;
@@ -274,7 +277,7 @@ function rcube_subscription_form($attrib)
$idx = $i + 1;
$sub_key = array_search($folder['id'], $a_subscribed);
$subscribed = $sub_key !== false;
- $protected = ($CONFIG['protect_default_folders'] == true && in_array($folder['id'], $CONFIG['default_folders']));
+ $protected = $protect_default && in_array($folder['id'], $default_folders);
$noselect = false;
$classes = array($i%2 ? 'even' : 'odd');
@@ -347,7 +350,7 @@ function rcube_subscription_form($attrib)
$OUTPUT->add_gui_object('subscriptionlist', $attrib['id']);
$OUTPUT->set_env('subscriptionrows', $a_js_folders);
- $OUTPUT->set_env('defaultfolders', $CONFIG['default_folders']);
+ $OUTPUT->set_env('defaultfolders', $default_folders);
$OUTPUT->set_env('delimiter', $delimiter);
return $form_start . $table->show($attrib) . $form_end;