Skip to content

Commit

Permalink
MDL-30610 standardise empty upgrade script content
Browse files Browse the repository at this point in the history
  • Loading branch information
skodak committed Dec 23, 2011
1 parent c5fb8b2 commit 8ef9da0
Show file tree
Hide file tree
Showing 13 changed files with 37 additions and 46 deletions.
3 changes: 3 additions & 0 deletions auth/manual/db/upgrade.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,8 @@
function xmldb_auth_manual_upgrade($oldversion) {
global $CFG, $DB, $OUTPUT;

$dbman = $DB->get_manager();


return true;
}
3 changes: 3 additions & 0 deletions auth/mnet/db/upgrade.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,8 @@
function xmldb_auth_mnet_upgrade($oldversion) {
global $CFG, $DB, $OUTPUT;

$dbman = $DB->get_manager();


return true;
}
5 changes: 4 additions & 1 deletion enrol/authorize/db/upgrade.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,10 @@
// before any action that may take longer time to finish.

function xmldb_enrol_authorize_upgrade($oldversion) {
global $CFG, $DB, $OUTPUT;
global $CFG, $DB;

$dbman = $DB->get_manager();


return true;
}
5 changes: 4 additions & 1 deletion enrol/database/db/upgrade.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,10 @@

defined('MOODLE_INTERNAL') || die();
function xmldb_enrol_database_upgrade($oldversion) {
global $DB;
global $CFG, $DB;

$dbman = $DB->get_manager();


return true;
}
3 changes: 3 additions & 0 deletions enrol/flatfile/db/upgrade.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,8 @@
function xmldb_enrol_flatfile_upgrade($oldversion) {
global $CFG, $DB;

$dbman = $DB->get_manager();


return true;
}
5 changes: 4 additions & 1 deletion enrol/imsenterprise/db/upgrade.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,10 @@
defined('MOODLE_INTERNAL') || die();

function xmldb_enrol_imsenterprise_upgrade($oldversion) {
global $CFG, $DB, $OUTPUT;
global $CFG, $DB;

$dbman = $DB->get_manager();


return true;
}
Expand Down
5 changes: 4 additions & 1 deletion enrol/mnet/db/upgrade.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,10 @@
defined('MOODLE_INTERNAL') || die();

function xmldb_enrol_mnet_upgrade($oldversion) {
global $CFG, $DB, $OUTPUT;
global $CFG, $DB;

$dbman = $DB->get_manager();


return true;
}
5 changes: 4 additions & 1 deletion enrol/paypal/db/upgrade.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,10 @@
// before any action that may take longer time to finish.

function xmldb_enrol_paypal_upgrade($oldversion) {
global $CFG, $DB, $OUTPUT;
global $CFG, $DB;

$dbman = $DB->get_manager();


return true;
}
5 changes: 4 additions & 1 deletion filter/mediaplugin/db/upgrade.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,10 @@
* @return bool result
*/
function xmldb_filter_mediaplugin_upgrade($oldversion) {
global $CFG, $DB, $OUTPUT;
global $CFG, $DB;

$dbman = $DB->get_manager();


return true;
}
5 changes: 4 additions & 1 deletion filter/tex/db/upgrade.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,10 @@
* @return bool result
*/
function xmldb_filter_tex_upgrade($oldversion) {
global $CFG, $DB, $OUTPUT;
global $CFG, $DB;

$dbman = $DB->get_manager();


return true;
}
13 changes: 0 additions & 13 deletions message/output/email/db/upgrade.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,19 +36,6 @@ function xmldb_message_email_upgrade($oldversion) {

$dbman = $DB->get_manager();

if ($oldversion < 2008072401) {
$processor = new stdClass();
$processor->name = 'email';
if (!$DB->record_exists('message_processors', array('name' => $processor->name)) ){
$DB->insert_record('message_processors', $processor);
}

/// email savepoint reached
upgrade_plugin_savepoint(true, 2008072401, 'message', 'email');
}

// Moodle v2.1.0 release upgrade line
// Put any upgrade step following this

// Moodle v2.2.0 release upgrade line
// Put any upgrade step following this
Expand Down
13 changes: 0 additions & 13 deletions message/output/jabber/db/upgrade.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,19 +36,6 @@ function xmldb_message_jabber_upgrade($oldversion) {

$dbman = $DB->get_manager();

if ($oldversion < 2008072401) {
$processor = new stdClass();
$processor->name = 'jabber';
if (!$DB->record_exists('message_processors', array('name' => $processor->name))){
$DB->insert_record('message_processors', $processor);
}

/// jabber savepoint reached
upgrade_plugin_savepoint(true, 2008072401, 'message', 'jabber');
}

// Moodle v2.1.0 release upgrade line
// Put any upgrade step following this

// Moodle v2.2.0 release upgrade line
// Put any upgrade step following this
Expand Down
13 changes: 0 additions & 13 deletions message/output/popup/db/upgrade.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,19 +36,6 @@ function xmldb_message_popup_upgrade($oldversion) {

$dbman = $DB->get_manager();

if ($oldversion < 2008072401) {
$processor = new stdClass();
$processor->name = 'popup';
if (! $DB->record_exists('message_processors', array('name' => $processor->name))){
$DB->insert_record('message_processors', $processor);
}

/// popup savepoint reached
upgrade_plugin_savepoint(true, 2008072401, 'message', 'popup');
}

// Moodle v2.1.0 release upgrade line
// Put any upgrade step following this

// Moodle v2.2.0 release upgrade line
// Put any upgrade step following this
Expand Down

0 comments on commit 8ef9da0

Please sign in to comment.