Commit 34d39a90 authored by Nigel McNie's avatar Nigel McNie
Browse files

A few changes:

 * Up the memory limit to 64M. The 16M limit was hit when migrating a 600 view Mahara, so I don't imagine 64M will be hit in the wild
 * Move the installation of the blockinstancecommit event to before the view migration. This is so that such events can be fired safely by blockinstances that are being committed
 * Install _all_ of the blocktypes when upgrading
parent 0c504f40
......@@ -28,6 +28,7 @@ defined('INTERNAL') || die();
function xmldb_core_upgrade($oldversion=0) {
ini_set('max_execution_time', 120); // Let's be safe
ini_set('memory_limit', '64M');
$status = true;
......@@ -170,6 +171,14 @@ function xmldb_core_upgrade($oldversion=0) {
drop_field($table, $field);
}
// Add the 'blockinstancecommit' event type
if ($oldversion < 2007082203) {
$event = (object)array(
'name' => 'blockinstancecommit',
);
ensure_record_exists('event_type', $event, $event);
}
if ($oldversion < 2007082201) {
// Rename the community tables to group - mysql version.
// This is really quite hacky. You can't rename columns with a foreign
......@@ -332,11 +341,11 @@ function xmldb_core_upgrade($oldversion=0) {
// needed for the template migration
install_blocktype_categories();
foreach(array(
'textbox',
'file/image', 'file/filedownload',
'textbox', 'externalfeed', 'externalvideo',
'file/image', 'file/filedownload', 'file/folder', 'file/internalmedia',
'blog/blogpost', 'blog/blog', 'blog/recentposts',
'resume/resumefield',
'internal/profileinfo') as $blocktype) {
'resume/resumefield', 'resume/entireresume',
'internal/profileinfo', 'internal/contactinfo') as $blocktype) {
$data = check_upgrades("blocktype.$blocktype");
upgrade_plugin($data);
}
......@@ -403,14 +412,6 @@ function xmldb_core_upgrade($oldversion=0) {
set_config('imagemaxheight', 1024);
}
// Add the 'blockinstancecommit' event type
if ($oldversion < 2007082203) {
$event = (object)array(
'name' => 'blockinstancecommit',
);
ensure_record_exists('event_type', $event, $event);
}
return $status;
}
......
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