-various optimizations
This commit is contained in:
parent
b500e2f7cc
commit
c3430e5411
4 changed files with 26 additions and 24 deletions
|
@ -1,15 +1,15 @@
|
|||
<?php
|
||||
|
||||
require_once __DIR__."/configs/ACL.php";
|
||||
|
||||
require_once 'propel/runtime/lib/Propel.php';
|
||||
Propel::init(__DIR__."/configs/airtime-conf-production.php");
|
||||
|
||||
require_once __DIR__."/logging/Logging.php";
|
||||
Logging::setLogPath('/var/log/airtime/zendphp.log');
|
||||
|
||||
require_once __DIR__."/configs/constants.php";
|
||||
require_once __DIR__."/configs/conf.php";
|
||||
|
||||
require_once __DIR__."/configs/ACL.php";
|
||||
require_once 'propel/runtime/lib/Propel.php';
|
||||
Propel::init(__DIR__."/configs/airtime-conf-production.php");
|
||||
|
||||
require_once __DIR__."/configs/constants.php";
|
||||
require_once 'DB.php';
|
||||
|
||||
require_once 'Preference.php';
|
||||
|
|
|
@ -9,15 +9,12 @@
|
|||
*/
|
||||
|
||||
|
||||
$configFile = isset($_SERVER['AIRTIME_CONF']) ? $_SERVER['AIRTIME_CONF'] : "/etc/airtime/airtime.conf";
|
||||
$ini = parse_ini_file($configFile, true);
|
||||
|
||||
$dbhost = $ini['database']['host'];
|
||||
$dbname = $ini['database']['dbname'];
|
||||
$dbuser = $ini['database']['dbuser'];
|
||||
$dbpass = $ini['database']['dbpass'];
|
||||
|
||||
global $CC_CONFIG;
|
||||
|
||||
$dbhost = $CC_CONFIG['dsn']['hostspec'];
|
||||
$dbname = $CC_CONFIG['dsn']['database'];
|
||||
$dbuser = $CC_CONFIG['dsn']['username'];
|
||||
$dbpass = $CC_CONFIG['dsn']['password'];
|
||||
|
||||
$conf = array (
|
||||
'datasources' =>
|
||||
|
|
|
@ -744,6 +744,7 @@ class ApiController extends Zend_Controller_Action
|
|||
|
||||
$request = $this->getRequest();
|
||||
$api_key = $request->getParam('api_key');
|
||||
$getDiskInfo = $request->getParam('diskinfo') == "true";
|
||||
/*
|
||||
if (!in_array($api_key, $CC_CONFIG["apiKey"]))
|
||||
{
|
||||
|
@ -762,10 +763,13 @@ class ApiController extends Zend_Controller_Action
|
|||
"liquidsoap"=>Application_Model_Systemstatus::GetLiquidsoapStatus(),
|
||||
"show_recorder"=>Application_Model_Systemstatus::GetShowRecorderStatus(),
|
||||
"media_monitor"=>Application_Model_Systemstatus::GetMediaMonitorStatus()
|
||||
),
|
||||
"partitions"=>Application_Model_Systemstatus::GetDiskInfo()
|
||||
)
|
||||
);
|
||||
|
||||
if ($getDiskInfo){
|
||||
$status["partitions"] = Application_Model_Systemstatus::GetDiskInfo();
|
||||
}
|
||||
|
||||
$this->view->status = $status;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue