Permalink
Browse files

Merge branch 'MDL-28250-23' of git://github.com/danpoltawski/moodle i…

…nto MOODLE_23_STABLE
  • Loading branch information...
2 parents cb3ab31 + 6062d3f commit d981c4b0fac3d70aee3f6254e79bc327a50e4475 @damyon damyon committed May 17, 2013
Showing with 24 additions and 3 deletions.
  1. +21 −0 lib/db/upgrade.php
  2. +2 −2 lib/licenselib.php
  3. +1 −1 version.php
View
@@ -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;
}
View
@@ -192,9 +192,9 @@ static public function install_licenses() {
$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);
View
@@ -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

0 comments on commit d981c4b

Please sign in to comment.