MDL-28250 license: upgrade old versions of cc-nc

The url was incorectly defined in previous versions

Conflicts:
	version.php
    lib/db/upgrade.php
This commit is contained in:
Dan Poltawski
2013-05-15 11:28:02 +01:00
parent 81fe100cf8
commit 6062d3f0bc
2 changed files with 22 additions and 1 deletions
+21
View File
@@ -1166,5 +1166,26 @@ function xmldb_main_upgrade($oldversion) {
upgrade_main_savepoint(true, 2012062506.08);
}
if ($oldversion < 2012062507.01) {
// Fix incorrect cc-nc url. Unfortunately the license 'plugins' do
// not give a mechanism to do this.
$sql = "UPDATE {license}
SET source = :url, version = :newversion
WHERE shortname = :shortname AND version = :oldversion";
$params = array(
'url' => 'http://creativecommons.org/licenses/by-nc/3.0/',
'shortname' => 'cc-nc',
'newversion' => '2013051500',
'oldversion' => '2010033100'
);
$DB->execute($sql, $params);
// Main savepoint reached.
upgrade_main_savepoint(true, 2012062507.01);
}
return true;
}
+1 -1
View File
@@ -30,7 +30,7 @@
defined('MOODLE_INTERNAL') || die();
$version = 2012062507.00; // YYYYMMDD = weekly release date of this DEV branch
$version = 2012062507.01; // YYYYMMDD = weekly release date of this DEV branch
// RR = release increments - 00 in DEV branches
// .XX = incremental changes