Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge branch 'w50_MDL-36597_m23_courselang' of git://github.com/skoda…

…k/moodle into MOODLE_23_STABLE
  • Loading branch information...
commit 5c7c78db26c16e019a39ae8bc820adde801be832 2 parents 8e81a8e + fb5d7df
@danpoltawski danpoltawski authored
Showing with 15 additions and 1 deletion.
  1. +14 −0 lib/db/upgrade.php
  2. +1 −1  version.php
View
14 lib/db/upgrade.php
@@ -985,5 +985,19 @@ function xmldb_main_upgrade($oldversion) {
upgrade_main_savepoint(true, 2012062502.07);
}
+ if ($oldversion < 2012062503.07) {
+ // Remove "_utf8" suffix from all langs in course table.
+ $langs = $DB->get_records_sql("SELECT DISTINCT lang FROM {course} WHERE lang LIKE ?", array('%_utf8'));
+
+ foreach ($langs as $lang=>$unused) {
+ $newlang = str_replace('_utf8', '', $lang);
+ $sql = "UPDATE {course} SET lang = :newlang WHERE lang = :lang";
+ $DB->execute($sql, array('newlang'=>$newlang, 'lang'=>$lang));
+ }
+
+ // Main savepoint reached.
+ upgrade_main_savepoint(true, 2012062503.07);
+ }
+
return true;
}
View
2  version.php
@@ -30,7 +30,7 @@
defined('MOODLE_INTERNAL') || die();
-$version = 2012062503.06; // YYYYMMDD = weekly release date of this DEV branch
+$version = 2012062503.07; // YYYYMMDD = weekly release date of this DEV branch
// RR = release increments - 00 in DEV branches
// .XX = incremental changes
Please sign in to comment.
Something went wrong with that request. Please try again.