From 81fe100cf83825d9a234d99a66a3ea4334909105 Mon Sep 17 00:00:00 2001 From: Wojciech Galiszek Date: Sun, 7 Apr 2013 17:03:53 +0200 Subject: [PATCH 1/2] MDL-28250 license: Correct cc-nc url --- lib/licenselib.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/licenselib.php b/lib/licenselib.php index c6700557653..5cd4c3df811 100644 --- a/lib/licenselib.php +++ b/lib/licenselib.php @@ -192,9 +192,9 @@ class license_manager { $license->shortname = 'cc-nc'; $license->fullname = 'Creative Commons - No Commercial'; - $license->source = 'http://creativecommons.org/licenses/by-nd/3.0/'; + $license->source = 'http://creativecommons.org/licenses/by-nc/3.0/'; $license->enabled = 1; - $license->version = '2010033100'; + $license->version = '2013051500'; $active_licenses[] = $license->shortname; self::add($license); From 6062d3f0bc8bafabcbaeb78919f1fee255ba822f Mon Sep 17 00:00:00 2001 From: Dan Poltawski Date: Wed, 15 May 2013 10:44:37 +0100 Subject: [PATCH 2/2] MDL-28250 license: upgrade old versions of cc-nc The url was incorectly defined in previous versions Conflicts: version.php lib/db/upgrade.php --- lib/db/upgrade.php | 21 +++++++++++++++++++++ version.php | 2 +- 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/lib/db/upgrade.php b/lib/db/upgrade.php index 04ae4e159b6..cc0cc3620ea 100644 --- a/lib/db/upgrade.php +++ b/lib/db/upgrade.php @@ -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; } diff --git a/version.php b/version.php index a34b6a8a6ac..f4ca38f9695 100644 --- a/version.php +++ b/version.php @@ -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