CC-2271 1.8.2 code cleanup tasks
This commit is contained in:
parent
a7176c4133
commit
2044e4bda8
|
@ -182,7 +182,7 @@ class AirtimeIni
|
||||||
AirtimeIni::UpdateIniValue(AirtimeIni::CONF_FILE_AIRTIME, 'airtime_dir', AirtimeInstall::CONF_DIR_WWW);
|
AirtimeIni::UpdateIniValue(AirtimeIni::CONF_FILE_AIRTIME, 'airtime_dir', AirtimeInstall::CONF_DIR_WWW);
|
||||||
AirtimeIni::UpdateIniValue(AirtimeIni::CONF_FILE_PYPO, 'api_key', "'$api_key'");
|
AirtimeIni::UpdateIniValue(AirtimeIni::CONF_FILE_PYPO, 'api_key', "'$api_key'");
|
||||||
AirtimeIni::UpdateIniValue(AirtimeIni::CONF_FILE_RECORDER, 'api_key', "'$api_key'");
|
AirtimeIni::UpdateIniValue(AirtimeIni::CONF_FILE_RECORDER, 'api_key', "'$api_key'");
|
||||||
AirtimeIni::UpdateIniValue(AirtimeIni::CONF_FILE_MEDIAMONITOR, 'api_key', "'$api_key'");
|
//AirtimeIni::UpdateIniValue(AirtimeIni::CONF_FILE_MEDIAMONITOR, 'api_key', "'$api_key'");
|
||||||
AirtimeIni::UpdateIniValue(AirtimeInstall::CONF_DIR_WWW.'/build/build.properties', 'project.home', AirtimeInstall::CONF_DIR_WWW);
|
AirtimeIni::UpdateIniValue(AirtimeInstall::CONF_DIR_WWW.'/build/build.properties', 'project.home', AirtimeInstall::CONF_DIR_WWW);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -76,7 +76,7 @@ set_include_path('.'.PATH_SEPARATOR.$CC_CONFIG['pearPath']
|
||||||
.PATH_SEPARATOR.$CC_CONFIG['zendPath']
|
.PATH_SEPARATOR.$CC_CONFIG['zendPath']
|
||||||
.PATH_SEPARATOR.$old_include_path);
|
.PATH_SEPARATOR.$old_include_path);
|
||||||
|
|
||||||
public static function LoadConfig($CC_CONFIG) {
|
function LoadConfig($CC_CONFIG) {
|
||||||
$values = parse_ini_file(CONF_FILE_AIRTIME, true);
|
$values = parse_ini_file(CONF_FILE_AIRTIME, true);
|
||||||
|
|
||||||
// Name of the web server user
|
// Name of the web server user
|
||||||
|
@ -110,7 +110,7 @@ public static function LoadConfig($CC_CONFIG) {
|
||||||
* This function creates the /etc/airtime configuration folder
|
* This function creates the /etc/airtime configuration folder
|
||||||
* and copies the default config files to it.
|
* and copies the default config files to it.
|
||||||
*/
|
*/
|
||||||
public static function CreateIniFiles()
|
function CreateIniFiles()
|
||||||
{
|
{
|
||||||
if (!file_exists("/etc/airtime/")){
|
if (!file_exists("/etc/airtime/")){
|
||||||
if (!mkdir("/etc/airtime/", 0755, true)){
|
if (!mkdir("/etc/airtime/", 0755, true)){
|
||||||
|
@ -137,7 +137,7 @@ public static function CreateIniFiles()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function ReadPythonConfig($p_filename)
|
function ReadPythonConfig($p_filename)
|
||||||
{
|
{
|
||||||
$values = array();
|
$values = array();
|
||||||
|
|
||||||
|
@ -153,7 +153,7 @@ public static function ReadPythonConfig($p_filename)
|
||||||
return $values;
|
return $values;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function UpdateIniValue($p_filename, $p_property, $p_value)
|
function UpdateIniValue($p_filename, $p_property, $p_value)
|
||||||
{
|
{
|
||||||
$lines = file($p_filename);
|
$lines = file($p_filename);
|
||||||
$n=count($lines);
|
$n=count($lines);
|
||||||
|
@ -171,7 +171,7 @@ public static function UpdateIniValue($p_filename, $p_property, $p_value)
|
||||||
fclose($fp);
|
fclose($fp);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function MergeConfigFiles($configFiles, $suffix)
|
function MergeConfigFiles($configFiles, $suffix)
|
||||||
{
|
{
|
||||||
foreach ($configFiles as $conf) {
|
foreach ($configFiles as $conf) {
|
||||||
if (file_exists("$conf$suffix.bak")) {
|
if (file_exists("$conf$suffix.bak")) {
|
||||||
|
@ -207,7 +207,7 @@ public static function MergeConfigFiles($configFiles, $suffix)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function InstallPhpCode()
|
function InstallPhpCode()
|
||||||
{
|
{
|
||||||
global $CC_CONFIG;
|
global $CC_CONFIG;
|
||||||
echo "* Installing PHP code to ".$CC_CONFIG['phpDir'].PHP_EOL;
|
echo "* Installing PHP code to ".$CC_CONFIG['phpDir'].PHP_EOL;
|
||||||
|
@ -216,7 +216,7 @@ public static function InstallPhpCode()
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function InstallBinaries()
|
function InstallBinaries()
|
||||||
{
|
{
|
||||||
echo "* Installing binaries to ".CONF_DIR_BINARIES.PHP_EOL;
|
echo "* Installing binaries to ".CONF_DIR_BINARIES.PHP_EOL;
|
||||||
exec("mkdir -p ".CONF_DIR_BINARIES);
|
exec("mkdir -p ".CONF_DIR_BINARIES);
|
||||||
|
|
Loading…
Reference in New Issue