From d9b60e315ed612f89a2a3eac410aa6b9d6344948 Mon Sep 17 00:00:00 2001 From: Petr Skoda Date: Wed, 6 Aug 2014 09:08:06 +1200 Subject: [PATCH] MDL-46692 forum: fix defaultpreference_trackforums to not depend on forum settings Existence of admin settings must not depend on other settings, especially not from other plugins. In any case somebody should cleaup the preference mess and allow plugins to setup user preferences instead of hardcoding everything in core. --- admin/settings/users.php | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/admin/settings/users.php b/admin/settings/users.php index 5a7e75ab10d..2e613e7122d 100644 --- a/admin/settings/users.php +++ b/admin/settings/users.php @@ -54,13 +54,11 @@ if ($hassiteconfig $temp->add(new admin_setting_configselect('defaultpreference_autosubscribe', new lang_string('autosubscribe'), '', 1, $choices)); - if (!empty($CFG->forum_trackreadposts)) { - $choices = array(); - $choices['0'] = new lang_string('trackforumsno'); - $choices['1'] = new lang_string('trackforumsyes'); - $temp->add(new admin_setting_configselect('defaultpreference_trackforums', new lang_string('trackforums'), - '', 0, $choices)); - } + $choices = array(); + $choices['0'] = new lang_string('trackforumsno'); + $choices['1'] = new lang_string('trackforumsyes'); + $temp->add(new admin_setting_configselect('defaultpreference_trackforums', new lang_string('trackforums'), + '', 0, $choices)); } $ADMIN->add('accounts', $temp);