Commit 25555c2a authored by Aaron Wells's avatar Aaron Wells Committed by Gerrit Code Review
Browse files

Merge "Making sure artefacts are locked for submitted views (Bug #1281787)"

parents c93b073a 30891a61
......@@ -3134,5 +3134,20 @@ function xmldb_core_upgrade($oldversion=0) {
}
}
if ($oldversion < 2014022400) {
// Make sure artefacts are properly locked for submitted views.
// Can be a problem for older sites
$submitted = get_records_sql_array("SELECT v.owner FROM {view_artefact} va
LEFT JOIN {view} v on v.id = va.view
LEFT JOIN {artefact} a on a.id = va.artefact
WHERE (v.submittedgroup IS NOT NULL OR v.submittedhost IS NOT NULL)", array());
if ($submitted) {
require_once(get_config('docroot') . 'artefact/lib.php');
foreach ($submitted as $record) {
ArtefactType::update_locked($record->owner);
}
}
}
return $status;
}
......@@ -15,7 +15,7 @@ $config = new stdClass();
// See https://wiki.mahara.org/index.php/Developer_Area/Version_Numbering_Policy
// For upgrades on stable branches, increment the version by one. On master, use the date.
$config->version = 2014021200;
$config->version = 2014022400;
$config->release = '1.9.0dev';
$config->minupgradefrom = 2009022600;
$config->minupgraderelease = '1.1.0 (release tag 1.1.0_RELEASE)';
......
Supports Markdown
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