Commit 393796b0 authored by Robert Lyon's avatar Robert Lyon
Browse files

Fixing a backporting mistake (Bug #1384497)



Older versions handle the check_upgrades() output
differently

Change-Id: I7b847d814a504ea4a15f1c7b8a1a9e5d008299bf
Signed-off-by: Robert Lyon's avatarRobert Lyon <robertl@catalyst.net.nz>
parent 4476dddf
...@@ -49,10 +49,6 @@ function check_upgrades($name=null) { ...@@ -49,10 +49,6 @@ function check_upgrades($name=null) {
catch (Exception $e) { catch (Exception $e) {
$coreversion = 0; $coreversion = 0;
} }
$core = new stdClass();
$core->to = $config->version;
$core->torelease = $config->release;
$core->toseries = $config->series;
if (empty($coreversion)) { if (empty($coreversion)) {
if (is_mysql()) { // Show a more informative error message if using mysql with skip-innodb if (is_mysql()) { // Show a more informative error message if using mysql with skip-innodb
// In MySQL 5.6.x, we run the command 'SHOW ENGINES' to check if InnoDB is enabled or not // In MySQL 5.6.x, we run the command 'SHOW ENGINES' to check if InnoDB is enabled or not
...@@ -71,7 +67,12 @@ function check_upgrades($name=null) { ...@@ -71,7 +67,12 @@ function check_upgrades($name=null) {
throw new ConfigSanityException("Mahara requires InnoDB tables. Please ensure InnoDB tables are enabled in your MySQL server."); throw new ConfigSanityException("Mahara requires InnoDB tables. Please ensure InnoDB tables are enabled in your MySQL server.");
} }
} }
$core = new stdClass();
$core->install = true; $core->install = true;
$core->to = $config->version;
$core->torelease = $config->release;
$core->toseries = $config->series;
$toupgrade['core'] = $core;
$installing = true; $installing = true;
} }
else if ($config->version > $coreversion) { else if ($config->version > $coreversion) {
...@@ -82,11 +83,15 @@ function check_upgrades($name=null) { ...@@ -82,11 +83,15 @@ function check_upgrades($name=null) {
. "($config->minupgraderelease) first " . "($config->minupgraderelease) first "
. " (you have $coreversion ($corerelease)"); . " (you have $coreversion ($corerelease)");
} }
$core = new stdClass();
$core->upgrade = true; $core->upgrade = true;
$core->from = $coreversion; $core->from = $coreversion;
$core->fromrelease = $corerelease; $core->fromrelease = $corerelease;
$core->to = $config->version;
$core->torelease = $config->release;
$core->toseries = $config->series;
$toupgrade['core'] = $core;
} }
$toupgrade['core'] = $core;
} }
// If we were just checking if the core needed to be upgraded, we can stop here // If we were just checking if the core needed to be upgraded, we can stop here
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment