Commit 73d613c1 authored by Hugh Davenport's avatar Hugh Davenport
Browse files

Fix upgrade from 1.4_STABLE to master



Bumps master version, and moves the upgrades that didn't happen
to the new bump, checking where nessesary if they have already been
applied

The new version bump is the date after the 1.4_STABLE branch
2011061100

Version numbers missed:
2011052400 - ctime in view access
2011053100 - default quota for institutions
2011053101 - group quota
2011060700 - retain view access on copy
2011060701 - set onlineuserssideblockmaxusers to 10, and add showonlineusers field to institutions

Bug #800917

Change-Id: I3594d22fda6c3c9eca0c5b86fde923ab37eb8752
Signed-off-by: default avatarHugh Davenport <hugh@catalyst.net.nz>
parent 5662b801
......@@ -2308,21 +2308,26 @@ function xmldb_core_upgrade($oldversion=0) {
}
}
if ($oldversion < 2011052400) {
if ($oldversion < 2011061100) {
// This block fixes an issue of upgrading from 1.4_STABLE to master
// version number is date after 1.4_STABLE
// 2011052400
// add_field checks if field exists
$table = new XMLDBTable('view_access');
$field = new XMLDBField('ctime');
$field->setAttributes(XMLDB_TYPE_DATETIME, null, null);
add_field($table, $field);
}
if ($oldversion < 2011053100) {
// 2011053100
// add_field checks if field exists
$table = new XMLDBTable('institution');
$field = new XMLDBField('defaultquota');
$field->setAttributes(XMLDB_TYPE_INTEGER, 10);
add_field($table, $field);
}
if ($oldversion < 2011053101) {
// 2011053101
// add_field checks if field exists
$table = new XMLDBTable('group');
$field = new XMLDBField('quota');
$field->setAttributes(XMLDB_TYPE_INTEGER, 10);
......@@ -2330,19 +2335,22 @@ function xmldb_core_upgrade($oldversion=0) {
$field = new XMLDBField('quotaused');
$field->setAttributes(XMLDB_TYPE_INTEGER, 10, null, XMLDB_NOTNULL, null, null, null, 0);
add_field($table, $field);
}
if ($oldversion < 2011060700) {
// 2011060700
// add_field checks if field exists
$table = new XMLDBTable('view');
$field = new XMLDBField('retainview');
$field->setAttributes(XMLDB_TYPE_INTEGER, 1, null, XMLDB_NOTNULL, null, null, null, 0);
add_field($table, $field);
}
if ($oldversion < 2011060701) {
// 2011060701
// site setting to limit online users count
set_config('onlineuserssideblockmaxusers', 10);
if (!get_config('onlineuserssideblockmaxusers')) {
set_config('onlineuserssideblockmaxusers', 10);
}
// 2011060701
// add_field checks if field exists
// instiutional setting to limit online users type
$table = new XMLDBTable('institution');
$field = new XMLDBField('showonlineusers');
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment