diff --git a/build/portal/html/classes/template.class.php b/build/portal/html/classes/template.class.php index 7ea4e07..e38e182 100644 --- a/build/portal/html/classes/template.class.php +++ b/build/portal/html/classes/template.class.php @@ -36,9 +36,12 @@ $common = new common($this); // Check if the portal is installed or needs upgraded. + + $thisVersion = "2.2.0"; + if (!file_exists($_SERVER['DOCUMENT_ROOT']."/classes/settings.class.php")) { header ("Location: /install/install.php"); - } elseif ($common->getSetting("version") != "2.1.0"){ + } elseif ($common->getSetting("version") != $thisVersion){ header ("Location: /install/upgrade.php"); } diff --git a/build/portal/html/install/index.php b/build/portal/html/install/index.php index b883ad8..7d001e9 100644 --- a/build/portal/html/install/index.php +++ b/build/portal/html/install/index.php @@ -29,7 +29,7 @@ ///////////////////////////////////////////////////////////////////////////////////// // The most current stable release. - $thisVersion = "2.1.0"; + $thisVersion = "2.2.0"; // Begin the upgrade process if this release is newer than what is installed. if (file_exists("../classes/settings.class.php")) { diff --git a/build/portal/html/install/upgrade.php b/build/portal/html/install/upgrade.php index c32e49a..f25e19c 100644 --- a/build/portal/html/install/upgrade.php +++ b/build/portal/html/install/upgrade.php @@ -35,7 +35,7 @@ $settings = new settings(); // The most current stable release. - $thisVersion = "2.1.0"; + $thisVersion = "2.2.0"; // Begin the upgrade process if this release is newer than what is installed. if ($common->getSetting("version") == $thisVersion) { @@ -219,7 +219,7 @@ if ($common->getSetting("version") == "2.0.2") { try { - $common->updateSetting("version", $thisVersion); + $common->updateSetting("version", "2.0.3"); $common->updateSetting("patch", ""); } catch(Exception $e) { $error = TRUE; @@ -330,7 +330,21 @@ $dbh = NULL; } } - $common->updateSetting("version", $thisVersion); + $common->updateSetting("version", "2.1.0"); + $common->updateSetting("patch", ""); + } catch(Exception $e) { + $error = TRUE; + $errorMessage = $e->getMessage(); + } + } + + /////////////////////// + // UPGRADE TO V2.2.0 + /////////////////////// + + if ($common->getSetting("version") == "2.1.0") { + try { + $common->updateSetting("version", "2.2.0"); $common->updateSetting("patch", ""); } catch(Exception $e) { $error = TRUE;