diff --git a/utils/phone_home_stat.php b/utils/phone_home_stat.php index 3de05a8da..d09d85c49 100644 --- a/utils/phone_home_stat.php +++ b/utils/phone_home_stat.php @@ -1,4 +1,17 @@ registerNamespace('Application_'); + +$resourceLoader = new Zend_Loader_Autoloader_Resource(array( + 'basePath' => $CC_CONFIG['phpDir'].'/'.'application', + 'namespace' => 'Application', + 'resourceTypes' => array( + 'model' => array( + 'path' => 'models/', + 'namespace' => 'Model', + ), + 'common' => array( + 'path' => 'common/', + 'namespace' => 'Common', + ), + ), +)); $infoArray = Application_Model_Preference::GetSystemInfo(true); @@ -88,6 +82,7 @@ if(Application_Model_Preference::GetSupportFeedback() == '1'){ curl_close($ch); } + // Get latest version from stat server and store to db if(Application_Model_Preference::GetPlanLevel() == 'disabled'){ $url = 'http://stat.sourcefabric.org/airtime-stats/airtime_latest_version'; @@ -113,16 +108,3 @@ if(Application_Model_Preference::GetPlanLevel() == 'disabled'){ curl_close($ch); } -/** - * Ensures that the user is running this PHP script with root - * permissions. If not running with root permissions, causes the - * script to exit. - */ -function exitIfNotRoot() -{ - // Need to check that we are superuser before running this. - if(posix_geteuid() != 0){ - echo "Must be root user.\n"; - exit(1); - } -}