mirrored from git://git.moodle.org/moodle.git
-
Notifications
You must be signed in to change notification settings - Fork 6.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bumped version and new rename field upgrading for HEAD.
- Loading branch information
ethem
committed
Nov 17, 2006
1 parent
4902ed7
commit df90fb9
Showing
2 changed files
with
26 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,38 @@ | ||
<?php //$Id$ | ||
|
||
// This file keeps track of upgrades to | ||
// the authorize enrol plugin | ||
// | ||
// Sometimes, changes between versions involve | ||
// alterations to database structures and other | ||
// major things that may break installations. | ||
// | ||
// The upgrade function in this file will attempt | ||
// to perform all the necessary actions to upgrade | ||
// your older installtion to the current version. | ||
// | ||
// If there's something it cannot do itself, it | ||
// will tell you what you need to do. | ||
// | ||
// The commands in here will all be database-neutral, | ||
// using the functions defined in lib/ddllib.php | ||
|
||
function xmldb_enrol_authorize_upgrade($oldversion=0) { | ||
|
||
global $CFG, $THEME, $db; | ||
|
||
$status = true; | ||
$result = true; | ||
|
||
if ($status && $oldversion < 2006101701) { | ||
if ($result && $oldversion < 2006111700) { | ||
$table = new XMLDBTable('enrol_authorize'); | ||
$field = new XMLDBField('cclastfour'); | ||
$field->setAttributes(XMLDB_TYPE_INTEGER, '4', XMLDB_UNSIGNED, XMLDB_NOTNULL, null, null, null, '0', 'paymentmethod'); | ||
$status = $status && rename_field($table, $field, 'refundinfo'); | ||
if (!field_exists($table, new XMLDBField('refundinfo'))) { | ||
$field = new XMLDBField('cclastfour'); | ||
$field->setAttributes(XMLDB_TYPE_INTEGER, '4', XMLDB_UNSIGNED, XMLDB_NOTNULL, null, null, null, '0', 'paymentmethod'); | ||
$result = $result && rename_field($table, $field, 'refundinfo'); | ||
} | ||
} | ||
|
||
return $status; | ||
return $result; | ||
} | ||
|
||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
<?php // $Id$ | ||
|
||
$plugin->version = 2006101701; | ||
$plugin->version = 2006111700; | ||
$plugin->requires = 2006100401; | ||
|
||
?> |