From 4c3911f934d230d617c33c5a2f94a6129b5bbcdb Mon Sep 17 00:00:00 2001 From: martinlanghoff Date: Tue, 1 Feb 2005 01:47:45 +0000 Subject: [PATCH] Merged from MOODLE_14_HEAD - Better behaviour of fix_course_sortorder() -- related to bug #2334 -- includes version bump to clear out recalcitrant sortorders --- lib/db/mysql.php | 4 ++++ lib/db/postgres7.php | 4 ++++ version.php | 2 +- 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/lib/db/mysql.php b/lib/db/mysql.php index 1ffc24ba65..da7a30a046 100644 --- a/lib/db/mysql.php +++ b/lib/db/mysql.php @@ -1142,6 +1142,10 @@ function main_upgrade($oldversion=0) { table_column('course_meta','id','id','integer','10','','0','not null'); } + if ($oldversion < 2005020100) { + fix_course_sortorder(0, 1, 1); + } + return $result; } diff --git a/lib/db/postgres7.php b/lib/db/postgres7.php index b368d8de0b..e01ace42da 100644 --- a/lib/db/postgres7.php +++ b/lib/db/postgres7.php @@ -907,6 +907,10 @@ function main_upgrade($oldversion=0) { table_column('course','','metacourse','integer','1','','0','not null'); } + if ($oldversion < 2005020100) { + fix_course_sortorder(0, 1, 1); + } + return $result; } diff --git a/version.php b/version.php index fe2b37e7ac..b85ed65cb6 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 = 2005012800; // YYYYMMDD = date of first major branch release 1.4 + $version = 2005020100; // 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