Merge branch 'master' of dev.sourcefabric.org:airtime
This commit is contained in:
commit
ce2b5564e4
4 changed files with 49 additions and 2 deletions
1
VERSION
Normal file
1
VERSION
Normal file
|
@ -0,0 +1 @@
|
||||||
|
1.8.0
|
|
@ -52,6 +52,7 @@ system("python ".__DIR__."/../python_apps/pypo/install/pypo-install.py");
|
||||||
echo PHP_EOL."*** Recorder Installation ***".PHP_EOL;
|
echo PHP_EOL."*** Recorder Installation ***".PHP_EOL;
|
||||||
system("python ".__DIR__."/../python_apps/show-recorder/install/recorder-install.py");
|
system("python ".__DIR__."/../python_apps/show-recorder/install/recorder-install.py");
|
||||||
|
|
||||||
|
AirtimeInstall::SetAirtimeVersion(AIRTIME_VERSION);
|
||||||
|
|
||||||
echo "******************************* Install Complete *******************************".PHP_EOL;
|
echo "******************************* Install Complete *******************************".PHP_EOL;
|
||||||
|
|
||||||
|
|
|
@ -7,13 +7,32 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require_once(dirname(__FILE__).'/include/AirtimeIni.php');
|
require_once(dirname(__FILE__).'/include/AirtimeIni.php');
|
||||||
|
set_include_path(__DIR__.'/../library' . PATH_SEPARATOR . get_include_path());
|
||||||
|
require_once __DIR__.'/../application/configs/conf.php';
|
||||||
|
require_once(dirname(__FILE__).'/include/AirtimeInstall.php');
|
||||||
|
|
||||||
AirtimeIni::ExitIfNotRoot();
|
AirtimeIni::ExitIfNotRoot();
|
||||||
|
AirtimeInstall::DbConnect(true);
|
||||||
|
|
||||||
|
if(AirtimeInstall::DbTableExists('cc_show_rebroadcast') === true) {
|
||||||
|
$version = "1.7.0";
|
||||||
|
echo "Airtime Version: ".$version." ".PHP_EOL;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$version = "1.6";
|
||||||
|
echo "Airtime Version: ".$version." ".PHP_EOL;
|
||||||
|
}
|
||||||
|
|
||||||
echo "******************************** Update Begin *********************************".PHP_EOL;
|
echo "******************************** Update Begin *********************************".PHP_EOL;
|
||||||
|
|
||||||
//system("php ".__DIR__."/upgrades/airtime-1.7/airtime-upgrade.php");
|
if(strcmp($version, "1.7.0") < 0) {
|
||||||
system("php ".__DIR__."/upgrades/airtime-1.8/airtime-upgrade.php");
|
system("php ".__DIR__."/upgrades/airtime-1.7/airtime-upgrade.php");
|
||||||
|
}
|
||||||
|
if(strcmp($version, "1.8.0") < 0) {
|
||||||
|
system("php ".__DIR__."/upgrades/airtime-1.8/airtime-upgrade.php");
|
||||||
|
}
|
||||||
|
|
||||||
|
AirtimeInstall::SetAirtimeVersion(AIRTIME_VERSION);
|
||||||
|
|
||||||
echo "******************************* Update Complete *******************************".PHP_EOL;
|
echo "******************************* Update Complete *******************************".PHP_EOL;
|
||||||
|
|
||||||
|
|
|
@ -165,6 +165,32 @@ class AirtimeInstall {
|
||||||
system($command);
|
system($command);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static function SetAirtimeVersion($p_version)
|
||||||
|
{
|
||||||
|
global $CC_DBC;
|
||||||
|
$sql = "DELETE FROM cc_pref WHERE keystr = 'system_version'";
|
||||||
|
$CC_DBC->query($sql);
|
||||||
|
|
||||||
|
$sql = "INSERT INTO cc_pref (keystr, valstr) VALUES ('system_version', '$p_version')";
|
||||||
|
$result = $CC_DBC->query($sql);
|
||||||
|
if (PEAR::isError($result)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function GetAirtimeVersion()
|
||||||
|
{
|
||||||
|
global $CC_DBC;
|
||||||
|
$sql = "SELECT valstr FROM cc_pref WHERE keystr = 'system_version'";
|
||||||
|
$version = $CC_DBC->GetOne($sql);
|
||||||
|
|
||||||
|
if (PEAR::isError($version)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return $version;
|
||||||
|
}
|
||||||
|
|
||||||
public static function DeleteFilesRecursive($p_path)
|
public static function DeleteFilesRecursive($p_path)
|
||||||
{
|
{
|
||||||
$command = "rm -rf $p_path";
|
$command = "rm -rf $p_path";
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue