From a7df430b710020d9df16d61bf742e12f67786ce0 Mon Sep 17 00:00:00 2001 From: stronk7 Date: Fri, 10 Oct 2008 18:06:16 +0000 Subject: [PATCH] Set the user->lang DB default to en_utf8. MDL-16845 ; merged from 19_STABLE --- lib/db/install.xml | 4 ++-- lib/db/upgrade.php | 13 +++++++++++++ version.php | 2 +- 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/lib/db/install.xml b/lib/db/install.xml index 81e28831a6..6cd878eeca 100644 --- a/lib/db/install.xml +++ b/lib/db/install.xml @@ -1,5 +1,5 @@ - @@ -469,7 +469,7 @@ - + diff --git a/lib/db/upgrade.php b/lib/db/upgrade.php index 8b70e7580d..b79ad6d58a 100644 --- a/lib/db/upgrade.php +++ b/lib/db/upgrade.php @@ -849,6 +849,19 @@ function xmldb_main_upgrade($oldversion) { upgrade_main_savepoint($result, 2008092300); } + if ($result && $oldversion < 2008101000) { + + /// Changing the default of field lang on table user to en_utf8 + $table = new xmldb_table('user'); + $field = new xmldb_field('lang', XMLDB_TYPE_CHAR, '30', null, XMLDB_NOTNULL, null, null, null, 'en_utf8', 'country'); + + /// Launch change of default for field lang + $dbman->change_field_default($table, $field); + + /// Main savepoint reached + upgrade_main_savepoint($result, 2008101000); + } + return $result; } diff --git a/version.php b/version.php index c76fd13e3e..3f43887ffa 100644 --- a/version.php +++ b/version.php @@ -6,7 +6,7 @@ // This is compared against the values stored in the database to determine // whether upgrades should be performed (see lib/db/*.php) - $version = 2008100801; // YYYYMMDD = date of the last version bump + $version = 2008101000; // YYYYMMDD = date of the last version bump // XX = daily increments $release = '2.0 dev (Build: 20081010)'; // Human-friendly version name -- 2.39.5