mirror of
https://github.com/moodle/moodle.git
synced 2025-04-20 07:56:06 +02:00
MDL-29615 message: reversed the default for messagingallowemailoverride and added upgrade code so upgraded sites maintain consistent behaviour
This commit is contained in:
parent
84f533b3c3
commit
8900213b92
@ -20,7 +20,7 @@ if ($hassiteconfig) { // speedup for non-admins, add all caps used on this page
|
||||
$options = array(DAYSECS=>new lang_string('secondstotime86400'), WEEKSECS=>new lang_string('secondstotime604800'), 2620800=>new lang_string('nummonths', 'moodle', 1), 15724800=>new lang_string('nummonths', 'moodle', 6),0=>new lang_string('never'));
|
||||
$optionalsubsystems->add(new admin_setting_configselect('messagingdeletereadnotificationsdelay', new lang_string('messagingdeletereadnotificationsdelay', 'admin'), new lang_string('configmessagingdeletereadnotificationsdelay', 'admin'), 604800, $options));
|
||||
|
||||
$optionalsubsystems->add(new admin_setting_configcheckbox('messagingallowemailoverride', new lang_string('messagingallowemailoverride', 'admin'), new lang_string('configmessagingallowemailoverride','admin'), 1));
|
||||
$optionalsubsystems->add(new admin_setting_configcheckbox('messagingallowemailoverride', new lang_string('messagingallowemailoverride', 'admin'), new lang_string('configmessagingallowemailoverride','admin'), 0));
|
||||
|
||||
$optionalsubsystems->add(new admin_setting_configcheckbox('enablestats', new lang_string('enablestats', 'admin'), new lang_string('configenablestats', 'admin'), 0));
|
||||
|
||||
|
@ -135,6 +135,16 @@ function xmldb_main_upgrade($oldversion) {
|
||||
upgrade_main_savepoint(true, 2012020200.03);
|
||||
}
|
||||
|
||||
if ($oldversion < 2012020200.06) {
|
||||
// Previously we always allowed users to override their email address via the messaging system
|
||||
// We have now added a setting to allow admins to turn this this ability on and off
|
||||
// While this setting defaults to 0 (off) we're setting it to 1 (on) to maintain the behaviour for upgrading sites
|
||||
set_config('messagingallowemailoverride', 1);
|
||||
|
||||
// Main savepoint reached
|
||||
upgrade_main_savepoint(true, 2012020200.06);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -30,7 +30,7 @@
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
|
||||
$version = 2012020200.05; // YYYYMMDD = weekly release date of this DEV branch
|
||||
$version = 2012020200.06; // YYYYMMDD = weekly release date of this DEV branch
|
||||
// RR = release increments - 00 in DEV branches
|
||||
// .XX = incremental changes
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user