Skip to content
Browse files

MDL-22232 messaging: miscelaneous fixes after integration review

  • Loading branch information...
1 parent bec1c29 commit 87a4bba39c2e84a17a947294a704f6e659bb6fa7 @andyjdavis andyjdavis committed Aug 26, 2011
Showing with 12 additions and 8 deletions.
  1. +10 −1 lib/db/upgrade.php
  2. +1 −6 message/edit.php
  3. +1 −1 version.php
View
11 lib/db/upgrade.php
@@ -6119,11 +6119,20 @@ function xmldb_main_upgrade($oldversion) {
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;
}
//TODO: Cleanup before the 2.0 release - we do not want to drag along these dev machine fixes forever
// 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"
View
7 message/edit.php
@@ -100,12 +100,7 @@
//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();
View
2 version.php
@@ -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

0 comments on commit 87a4bba

Please sign in to comment.
Something went wrong with that request. Please try again.