CC-1927: remove-pear-db

-fixed install/uninstall messages
This commit is contained in:
Martin Konecny 2012-04-20 16:10:19 -04:00
parent 2a9ea435f2
commit 1654de64b1
2 changed files with 14 additions and 0 deletions

View file

@ -60,6 +60,16 @@ class AirtimeInstall
return null;
}
try {
$version = $con->query($sql)->fetchColumn(0);
} catch (PDOException $e){
// no pref table therefore Airtime is not installed.
//We only get here if airtime database exists, but the table doesn't
//This state sometimes happens if a previous Airtime uninstall couldn't remove
//the database because it was busy, so it just removed the tables instead.
return null;
}
$sql = "SELECT valstr FROM cc_pref WHERE keystr = 'system_version' LIMIT 1";
$version = $con->query($sql)->fetchColumn(0);