From bb043e3843de0a5a654f135edb57e085aac19eab Mon Sep 17 00:00:00 2001 From: moodler Date: Mon, 15 Nov 2004 09:34:04 +0000 Subject: [PATCH] Fixing up any references to obsolete language pack ma_nt --- lib/db/mysql.php | 5 +++++ lib/db/postgres7.php | 5 +++++ version.php | 2 +- 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/lib/db/mysql.php b/lib/db/mysql.php index aa0f63aea7..bf77ddd39f 100644 --- a/lib/db/mysql.php +++ b/lib/db/mysql.php @@ -874,6 +874,11 @@ function main_upgrade($oldversion=0) { ) TYPE=MyISAM COMMENT='Optional database session storage, not used by default';"); } + if ($oldversion < 2004111500) { // Update any users/courses using wrongly-named lang pack + execute_sql("UPDATE {$CFG->prefix}user SET lang = 'mi_nt' WHERE lang = 'ma_nt'"); + execute_sql("UPDATE {$CFG->prefix}course SET lang = 'mi_nt' WHERE lang = 'ma_nt'"); + } + return $result; } diff --git a/lib/db/postgres7.php b/lib/db/postgres7.php index 4a7afde154..ca6dc516ca 100644 --- a/lib/db/postgres7.php +++ b/lib/db/postgres7.php @@ -612,6 +612,11 @@ function main_upgrade($oldversion=0) { execute_sql(" CREATE INDEX {$CFG->prefix}sessions_expiry_idx ON {$CFG->prefix}sessions (expiry)"); } + + if ($oldversion < 2004111500) { // Update any users/courses using wrongly-named lang pack + execute_sql("UPDATE {$CFG->prefix}user SET lang = 'mi_nt' WHERE lang = 'ma_nt'"); + execute_sql("UPDATE {$CFG->prefix}course SET lang = 'mi_nt' WHERE lang = 'ma_nt'"); + } return $result; diff --git a/version.php b/version.php index 0360d2cbf2..0cb0cff764 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 = 2004111200; // YYYYMMDD = date of first major branch release 1.4 + $version = 2004111500; // YYYYMMDD = date of first major branch release 1.4 // XY = increments within a single day $release = '1.5 UNSTABLE DEVELOPMENT'; // Human-friendly version name -- 2.39.5