Skip to content

Commit

Permalink
MDL-14484 rerun asearchtemplate upgrade - there were reported problem…
Browse files Browse the repository at this point in the history
…s on some sites
  • Loading branch information
skodak committed Apr 25, 2008
1 parent 06f5909 commit 2439bed
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
12 changes: 12 additions & 0 deletions mod/data/db/upgrade.php
Expand Up @@ -97,6 +97,18 @@ function xmldb_data_upgrade($oldversion=0) {
}
}

if ($result && $oldversion < 2007101512) {
/// Launch add field asearchtemplate again if does not exists yet - reported on several sites

$table = new XMLDBTable('data');
$field = new XMLDBField('asearchtemplate');
$field->setAttributes(XMLDB_TYPE_TEXT, 'small', null, null, null, null, null, null, 'jstemplate');

if (!field_exists($table, $field)) {
$result = $result && add_field($table, $field);
}
}

return $result;
}

Expand Down
2 changes: 1 addition & 1 deletion mod/data/version.php
Expand Up @@ -5,7 +5,7 @@
// This fragment is called by /admin/index.php
////////////////////////////////////////////////////////////////////////////////

$module->version = 2007101511;
$module->version = 2007101512;
$module->requires = 2007101509; // Requires this Moodle version
$module->cron = 60;

Expand Down

0 comments on commit 2439bed

Please sign in to comment.