From 79d8eda53ad3fd3a1bc1e448f926cf236a364cd5 Mon Sep 17 00:00:00 2001 From: Martin Konecny Date: Fri, 20 Apr 2012 16:16:27 -0400 Subject: [PATCH] CC-1927: remove-pear-db -fixed install/uninstall messages --- install_minimal/include/AirtimeInstall.php | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/install_minimal/include/AirtimeInstall.php b/install_minimal/include/AirtimeInstall.php index 9b7038a82..4dc8555a8 100644 --- a/install_minimal/include/AirtimeInstall.php +++ b/install_minimal/include/AirtimeInstall.php @@ -60,6 +60,8 @@ class AirtimeInstall return null; } + $sql = "SELECT valstr FROM cc_pref WHERE keystr = 'system_version' LIMIT 1"; + try { $version = $con->query($sql)->fetchColumn(0); } catch (PDOException $e){ @@ -70,17 +72,10 @@ class AirtimeInstall return null; } - $sql = "SELECT valstr FROM cc_pref WHERE keystr = 'system_version' LIMIT 1"; - $version = $con->query($sql)->fetchColumn(0); - - if (!$version) { - // no pref table something is wrong. - return null; - } - + //if version is empty string, then version is older than version 1.8.0 if ($version == '') { try { - // If this table exists, then it's 1.7.0 + // If this table exists, then it's version 1.7.0 $sql = "SELECT * FROM cc_show_rebroadcast LIMIT 1"; $result = $con->query($sql)->fetchColumn(0); $version = "1.7.0";