CC-4383: Fatal error in phone_home_stat script (2.2.0 dev)

- fixed
This commit is contained in:
James 2012-09-17 17:47:32 -04:00
parent c9b7fa7073
commit db52f1cfcf
1 changed files with 11 additions and 26 deletions

View File

@ -35,23 +35,21 @@ get_include_path(),
realpath($CC_CONFIG['phpDir'] . '/library')
)));
function __autoload($classname){
function my_autoload($classname){
global $CC_CONFIG;
$info = explode('_', $classname);
if (isset($info[2])) {
if (isset($info[1]) && isset($info[2])) {
$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');
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');
spl_autoload_register('my_autoload');
require_once 'propel/runtime/lib/Propel.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');
$autoloader = Zend_Loader_Autoloader::getInstance();
try {
$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));
$infoArray = Application_Model_Preference::GetSystemInfo(true);
if(Application_Model_Preference::GetSupportFeedback() == '1'){
$url = 'http://stat.sourcefabric.org/index.php?p=airtime';