Permalink
Browse files

MDL-43797 lib/db/upgrade.php: Remove custom pages for deleted users

Change-Id: I51f7d11abdf559944e18891703611dbd729cde64
  • Loading branch information...
DavidCurry committed Jan 22, 2014
1 parent daea5bf commit 0be63969930e6ccb975d55c5363ccc9b87184d77
Showing with 14 additions and 1 deletion.
  1. +13 −0 lib/db/upgrade.php
  2. +1 −1 version.php
View
@@ -2329,5 +2329,18 @@ function xmldb_main_upgrade($oldversion) {
upgrade_main_savepoint(true, 2013051404.02);
}
if ($oldversion < 2013051404.04) {
// Remove deleted users home pages.
$active = $DB->get_fieldset_select('user', 'id', 'deleted = ?', array(0));
list($insql, $params) = $DB->get_in_or_equal($active, SQL_PARAMS_QM, 'param', false);
$sql = 'DELETE FROM {my_pages}
WHERE userid ' . $insql;
$DB->execute($sql, $params);
// Reached main savepoint.
upgrade_main_savepoint(true, 2013051404.04);
}
return true;
}
View
@@ -29,7 +29,7 @@
defined('MOODLE_INTERNAL') || die();
$version = 2013051404.03; // 20130514 = branching date YYYYMMDD - do not modify!
$version = 2013051404.04; // 20130514 = branching date YYYYMMDD - do not modify!
// RR = release increments - 00 in DEV branches
// .XX = incremental changes

0 comments on commit 0be6396

Please sign in to comment.