Check for upgrade force install.

pull/173/head
Joe Prochazka 2016-04-22 16:48:38 -04:00
rodzic d94d3a4b0c
commit b4a9a7f2b4
2 zmienionych plików z 15 dodań i 2 usunięć

Wyświetl plik

@ -28,6 +28,9 @@
// SOFTWARE. //
/////////////////////////////////////////////////////////////////////////////////////
// The most current stable release.
$thisVersion = "2.0.1";
class template {
// PUT THE TEMPLATE TOGETHER
@ -35,8 +38,17 @@
function display(&$pageData) {
$common = new common($this);
// The Base URL of this page (needed for Plane Finder client link)
$pageData['baseurl'] = $common->getBaseUrl();
// Check if the portal is installed or needs upgraded.
if (file_exists("settings.class.php")) {
if ($thisVersion > $common->getSetting("version") {
header ("Location: upgrade.php");
}
} else {
header ("Location: install.php");
}
// The Base URL of this page (needed for Plane Finder client link)
$pageData['baseurl'] = $common->getBaseUrl();
// Load the master template.
$master = $this->readTemplate('master.tpl');

Wyświetl plik

@ -352,6 +352,7 @@ EOF;
// Add settings.
$common->addSetting('version', $thisVersion);
$common->addSetting('patch', '');
$common->addSetting('siteName', 'ADS-B Receiver');
$common->addSetting('template', 'default');
$common->addSetting('defaultPage', 'blog.php');