MDL-22232 messaging: miscelaneous fixes after integration review

This commit is contained in:
Andrew Davis (andyjdavis)
2011-08-26 15:59:31 +08:00
parent bec1c29d84
commit 87a4bba39c
3 changed files with 12 additions and 8 deletions
+10 -1
View File
@@ -6119,6 +6119,16 @@ FROM
upgrade_main_savepoint(true, 2011033003.09);
}
if ($oldversion < 2011033004.04) {
//preference not required since 2.0
$DB->delete_records('user_preferences', array('name'=>'message_showmessagewindow'));
//re-introducing emailstop. check that its turned off so people dont suddenly stop getting notifications
$DB->set_field('user', 'emailstop', 0);
upgrade_main_savepoint(true, 2011033004.04);
}
return true;
}
@@ -6126,4 +6136,3 @@ FROM
// 1/ drop block_pinned_old table here and in install.xml
// 2/ drop block_instance_old table here and in install.xml
//TODO: AFTER 2.0 remove the column user->emailstop and the user preference "message_showmessagewindow"
+1 -6
View File
@@ -100,12 +100,7 @@ if (($form = data_submitted()) && confirm_sesskey()) {
//only update the user's "emailstop" if its actually changed
if ( $user->emailstop != $disableall ) {
$user->emailstop = $disableall;
//create a new user object just in case any other changes have been
//made to the user object that we don't want to save
$usertoupdate = new stdClass();
$usertoupdate->id = $user->id;
$usertoupdate->emailstop = $user->emailstop;
$DB->update_record('user', $usertoupdate);
$DB->set_field('user', 'emailstop', $user->emailstop, array("id"=>$user->id));
}
$preferences = array();
+1 -1
View File
@@ -30,7 +30,7 @@
defined('MOODLE_INTERNAL') || die();
$version = 2011033004.03; // 20110330 = branching date YYYYMMDD - do not modify!
$version = 2011033004.04; // 20110330 = branching date YYYYMMDD - do not modify!
// RR = release version - do not change in weeklies
// .XX = incremental changes