CC-1927: Remove Pear DB

Final touches on install/upgrade scripts, now they are working.
Still need to remove last traces of PEAR throughout the code.
This commit is contained in:
paul.baranowski 2012-04-02 00:31:26 -04:00 committed by Martin Konecny
parent 95d69a3bbe
commit c0da27b445
4 changed files with 13 additions and 53 deletions

View file

@ -1,30 +1,31 @@
<?php
/**
* @package Airtime
* @copyright 2011 Sourcefabric O.P.S.
* @license http://www.gnu.org/licenses/gpl.txt
*
* Checks if a current version of Airtime is installed.
* If so, the user is presented with the help menu and can
* choose -r to reinstall.
*
*
* Returns 0 if Airtime is not installed
* Returns 1 if the same version of Airtime already installed
* Returns 2 if a previous version of Airtime is installed we can upgrade from
* Returns 3 if a version of Airtime is installed that we can't upgrade from.
*/
require_once(dirname(__FILE__).'/AirtimeInstall.php');
require_once(__DIR__.'/AirtimeInstall.php');
require_once(__DIR__.'/airtime-constants.php');
AirtimeInstall::ExitIfNotRoot();
require_once(AirtimeInstall::GetAirtimeSrcDir()."/application/configs/conf.php");
require_once('propel/runtime/lib/Propel.php');
Propel::init(AirtimeInstall::GetAirtimeSrcDir()."/application/configs/airtime-conf-production.php");
$version = AirtimeInstall::GetVersionInstalled();
// The current version is already installed.
echo "* Checking for existing Airtime installation...".PHP_EOL;
if (isset($version)){
if ($version === false){
//version of Airtime older than 1.7.0 detected
exit(3);
exit(3);
} else {
if (($version == AIRTIME_VERSION)) {
//same version of Airtime is already installed