Permalink
Browse files

MDL-29615 message: reversed the default for messagingallowemailoverri…

…de and added upgrade code so upgraded sites maintain consistent behaviour
  • Loading branch information...
andyjdavis authored and wdjunaidi committed Feb 1, 2012
1 parent b7aa073 commit 435b4d8e1876f698b873e755308be0cd82542af1
Showing with 12 additions and 2 deletions.
  1. +1 −1 admin/settings/subsystems.php
  2. +10 −0 lib/db/upgrade.php
  3. +1 −1 version.php
@@ -20,7 +20,7 @@
$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));
View
@@ -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;
}
View
@@ -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

0 comments on commit 435b4d8

Please sign in to comment.