Merge branch 'devel' of dev.sourcefabric.org:airtime into devel
This commit is contained in:
commit
5d332ba5ea
40 changed files with 275 additions and 92 deletions
|
@ -61,16 +61,21 @@ class AirtimeInstall
|
|||
}
|
||||
|
||||
$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.
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
//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";
|
||||
|
|
|
@ -69,6 +69,7 @@ fi
|
|||
|
||||
mkdir -p /usr/lib/airtime
|
||||
cp -R $AIRTIMEROOT/utils /usr/lib/airtime
|
||||
cp -R $AIRTIMEROOT/python_apps/std_err_override /usr/lib/airtime
|
||||
|
||||
echo "* Creating symbolic links in /usr/bin"
|
||||
#create symbolic links
|
||||
|
|
|
@ -14,7 +14,7 @@ require_once(__DIR__.'/airtime-constants.php');
|
|||
|
||||
AirtimeInstall::ExitIfNotRoot();
|
||||
|
||||
require_once(AirtimeInstall::GetAirtimeSrcDir()."/application/configs/conf.php");
|
||||
require_once(AirtimeInstall::GetAirtimeSrcDir()."/application/configs/db-conf.php");
|
||||
require_once('propel/runtime/lib/Propel.php');
|
||||
Propel::init(AirtimeInstall::GetAirtimeSrcDir()."/application/configs/airtime-conf-production.php");
|
||||
|
||||
|
|
|
@ -18,6 +18,10 @@ if (!file_exists(AirtimeIni::CONF_FILE_AIRTIME)) {
|
|||
require_once(__DIR__.'/airtime-constants.php');
|
||||
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");
|
||||
|
||||
echo PHP_EOL;
|
||||
echo "* Uninstalling Airtime ".AIRTIME_VERSION.PHP_EOL;
|
||||
//AirtimeInstall::UninstallPhpCode();
|
||||
|
|
|
@ -20,6 +20,7 @@ require_once(__DIR__.'/airtime-constants.php');
|
|||
require_once(__DIR__.'/AirtimeIni.php');
|
||||
require_once(__DIR__.'/AirtimeInstall.php');
|
||||
require_once 'propel/runtime/lib/Propel.php';
|
||||
Propel::init(AirtimeInstall::GetAirtimeSrcDir()."/application/configs/db-conf.php");
|
||||
Propel::init(AirtimeInstall::GetAirtimeSrcDir()."/application/configs/airtime-conf-production.php");
|
||||
|
||||
|
||||
|
@ -106,9 +107,6 @@ if (strcmp($version, "2.1.0") < 0){
|
|||
$sql = "DELETE FROM cc_pref WHERE keystr = 'system_version'";
|
||||
$con->exec($sql);
|
||||
|
||||
$values = parse_ini_file(CONF_FILE_AIRTIME, true);
|
||||
$phpDir = $values['general']['airtime_dir'];
|
||||
|
||||
$newVersion = AIRTIME_VERSION;
|
||||
$sql = "INSERT INTO cc_pref (keystr, valstr) VALUES ('system_version', '$newVersion')";
|
||||
$con->exec($sql);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue