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.
This commit is contained in:
Eloy Lafuente (stronk7) 2013-03-06 18:53:15 +01:00
parent 5379574a7d
commit 71db4e58d7

View file

@ -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 // 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. // 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. // Retrieve the list of course_sections as a recordset to save memory.
// This is to fix a regression caused by MDL-37939. // This is to fix a regression caused by MDL-37939.
// In this case the upgrade step is fixing records where: // In this case the upgrade step is fixing records where: