CC-4383: Fatal error in phone_home_stat script (2.2.0 dev)
- fixed
This commit is contained in:
parent
c9b7fa7073
commit
db52f1cfcf
|
@ -35,23 +35,21 @@ get_include_path(),
|
||||||
realpath($CC_CONFIG['phpDir'] . '/library')
|
realpath($CC_CONFIG['phpDir'] . '/library')
|
||||||
)));
|
)));
|
||||||
|
|
||||||
function __autoload($classname){
|
function my_autoload($classname){
|
||||||
global $CC_CONFIG;
|
global $CC_CONFIG;
|
||||||
$info = explode('_', $classname);
|
$info = explode('_', $classname);
|
||||||
if (isset($info[2])) {
|
if (isset($info[1]) && isset($info[2])) {
|
||||||
$filename = $info[2].".php";
|
$filename = $info[2].".php";
|
||||||
require_once($CC_CONFIG['phpDir'].'/application/models/'.$filename);
|
if ($info[1] == "Model") {
|
||||||
|
$folderName = "models";
|
||||||
|
} else if ($info[1] == "Common") {
|
||||||
|
$folderName = "common";
|
||||||
|
}
|
||||||
|
require_once($CC_CONFIG['phpDir'].'/application/'.$folderName.'/'.$filename);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
require_once($CC_CONFIG['phpDir'].'/application/models/User.php');
|
|
||||||
require_once($CC_CONFIG['phpDir'].'/application/models/StoredFile.php');
|
spl_autoload_register('my_autoload');
|
||||||
require_once($CC_CONFIG['phpDir'].'/application/models/Playlist.php');
|
|
||||||
require_once($CC_CONFIG['phpDir'].'/application/models/Schedule.php');
|
|
||||||
require_once($CC_CONFIG['phpDir'].'/application/models/Show.php');
|
|
||||||
require_once($CC_CONFIG['phpDir'].'/application/models/ShowInstance.php');
|
|
||||||
require_once($CC_CONFIG['phpDir'].'/application/models/Preference.php');
|
|
||||||
require_once($CC_CONFIG['phpDir'].'/application/models/StreamSetting.php');
|
|
||||||
require_once($CC_CONFIG['phpDir'].'/application/models/LiveLog.php');
|
|
||||||
|
|
||||||
require_once 'propel/runtime/lib/Propel.php';
|
require_once 'propel/runtime/lib/Propel.php';
|
||||||
Propel::init($CC_CONFIG['phpDir']."/application/configs/airtime-conf-production.php");
|
Propel::init($CC_CONFIG['phpDir']."/application/configs/airtime-conf-production.php");
|
||||||
|
@ -64,20 +62,7 @@ if (file_exists('/usr/share/php/libzend-framework-php')){
|
||||||
require_once('Zend/Loader/Autoloader.php');
|
require_once('Zend/Loader/Autoloader.php');
|
||||||
$autoloader = Zend_Loader_Autoloader::getInstance();
|
$autoloader = Zend_Loader_Autoloader::getInstance();
|
||||||
|
|
||||||
try {
|
$infoArray = Application_Model_Preference::GetSystemInfo(true);
|
||||||
$opts = new Zend_Console_Getopt(
|
|
||||||
array(
|
|
||||||
'test|t' => "Keep broadcast log data\n"
|
|
||||||
)
|
|
||||||
);
|
|
||||||
$opts->parse();
|
|
||||||
}
|
|
||||||
catch (Zend_Console_Getopt_Exception $e) {
|
|
||||||
print $e->getMessage() .PHP_EOL;
|
|
||||||
exit(1);
|
|
||||||
}
|
|
||||||
|
|
||||||
$infoArray = Application_Model_Preference::GetSystemInfo(true, isset($opts->t));
|
|
||||||
|
|
||||||
if(Application_Model_Preference::GetSupportFeedback() == '1'){
|
if(Application_Model_Preference::GetSupportFeedback() == '1'){
|
||||||
$url = 'http://stat.sourcefabric.org/index.php?p=airtime';
|
$url = 'http://stat.sourcefabric.org/index.php?p=airtime';
|
||||||
|
|
Loading…
Reference in New Issue