CC-1927 Remove PEAR DB

* Removed all traces of PEAR functions.
* Fixed AirtimeInstall::GetVersionInstalled() to return the correct answer
  even when it cant connect to the database.  Also fixed return value to
  be consistent on failure.
* Fixed phone_home_stat.php and soundcloud-uploader.php
This commit is contained in:
paul.baranowski 2012-04-05 02:22:21 -04:00 committed by Martin Konecny
parent c0da27b445
commit 96b010e7f0
10 changed files with 65 additions and 120 deletions

View file

@ -38,10 +38,20 @@ class AirtimeInstall
}
}
/**
* Return the version of Airtime currently installed.
* If not installed, return null.
*
* @return NULL|string
*/
public static function GetVersionInstalled()
{
global $CC_CONFIG;
$con = Propel::getConnection();
try {
$con = Propel::getConnection();
} catch (PropelException $e) {
return null;
}
if (file_exists('/etc/airtime/airtime.conf')) {
$values = parse_ini_file('/etc/airtime/airtime.conf', true);
@ -66,7 +76,7 @@ class AirtimeInstall
//echo "Airtime Version: ".$version." ".PHP_EOL;
}
else {
$version = false;
$version = null;
}
}