From 71db4e58d767e79bc77e5d01905e445126d25a12 Mon Sep 17 00:00:00 2001 From: "Eloy Lafuente (stronk7)" Date: Wed, 6 Mar 2013 18:53:15 +0100 Subject: [PATCH] MDL-38173 Swap conditions to make CI servers happy. The alternatives were: 1) wrap the whole block within a "standard" upgrade step, indenting everything one more level. 2) Change (relax) the savepoints checker in the CI servers, not good in general. So at the end, swapping conditions seemed to be the easier and better alternative. After all, "&&" is commutative, lol. --- lib/db/upgrade.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/db/upgrade.php b/lib/db/upgrade.php index e1de53cfcae..bf47860420b 100644 --- a/lib/db/upgrade.php +++ b/lib/db/upgrade.php @@ -1063,7 +1063,8 @@ function xmldb_main_upgrade($oldversion) { // This is checking to see if the site has been running a specific version with a bug in it // because this upgrade step is slow and is only needed if the site has been running with the previous patch installed. - if ($oldversion >= 2012062504.08 && $oldversion < 2012062504.11) { + // Note the conditions order in not the natual one for intervals, but that way the CI servers will be happy. Ugly swap. + if ($oldversion < 2012062504.11 && $oldversion >= 2012062504.08) { // Retrieve the list of course_sections as a recordset to save memory. // This is to fix a regression caused by MDL-37939. // In this case the upgrade step is fixing records where: