diff --git a/lib/db/upgrade.php b/lib/db/upgrade.php index 1e464e4edbd..a8d71bdab63 100644 --- a/lib/db/upgrade.php +++ b/lib/db/upgrade.php @@ -2139,5 +2139,26 @@ function xmldb_main_upgrade($oldversion) { upgrade_main_savepoint(true, 2013042300.00); } + if ($oldversion < 2013051400.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, 2013051400.01); + } + return true; } 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); diff --git a/version.php b/version.php index fd0024fd861..a8ac83aece3 100644 --- a/version.php +++ b/version.php @@ -29,7 +29,7 @@ defined('MOODLE_INTERNAL') || die(); -$version = 2013051400.00; // YYYYMMDD = weekly release date of this DEV branch +$version = 2013051700.00; // YYYYMMDD = weekly release date of this DEV branch // RR = release increments - 00 in DEV branches // .XX = incremental changes