CC-2934: Phone Home Stat: it should work with new airtime-check-system
- initial commit
This commit is contained in:
parent
9506161b70
commit
8f6804155f
2 changed files with 6 additions and 2 deletions
|
@ -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);
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue