mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 06:18:28 +01:00
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.
This commit is contained in:
parent
d29fb4ac65
commit
d9b60e315e
@ -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);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user