CC-2934: Phone Home Stat: it should work with new airtime-check-system

- initial commit
This commit is contained in:
James 2011-11-01 14:52:27 -04:00
parent 9506161b70
commit 8f6804155f
2 changed files with 6 additions and 2 deletions

View file

@ -329,7 +329,7 @@ class Application_Model_Preference
}
public static function GetSystemInfo($returnArray=false){
exec('/usr/bin/airtime-check-system', $output);
exec('/usr/bin/airtime-check-system --no-color', $output);
$output = preg_replace('/\s+/', ' ', $output);

View file

@ -54,13 +54,17 @@ if (PEAR::isError($CC_DBC)) {
//echo "* Connected to database".PHP_EOL;
$CC_DBC->setFetchMode(DB_FETCHMODE_ASSOC);
}
if(Application_Model_Preference::GetSupportFeedback() == '1'){
$infoArray = Application_Model_Preference::GetSystemInfo(true);
$url = 'http://stat.sourcefabric.org/index.php?p=airtime';
//$url = 'http://stat-dev.sourcefabric.org/index.php?p=airtime';
$ch = curl_init();
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_URL, 'http://stat.sourcefabric.org/index.php?p=airtime');
curl_setopt($ch, CURLOPT_URL, $url);
$data = json_encode($infoArray);