From 8f6804155f3f44897e00b6be1905137f5a2b3405 Mon Sep 17 00:00:00 2001 From: James Date: Tue, 1 Nov 2011 14:52:27 -0400 Subject: [PATCH] CC-2934: Phone Home Stat: it should work with new airtime-check-system - initial commit --- airtime_mvc/application/models/Preference.php | 2 +- utils/phone_home_stat.php | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/airtime_mvc/application/models/Preference.php b/airtime_mvc/application/models/Preference.php index 337ba052b..f7fca885e 100644 --- a/airtime_mvc/application/models/Preference.php +++ b/airtime_mvc/application/models/Preference.php @@ -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); diff --git a/utils/phone_home_stat.php b/utils/phone_home_stat.php index efa005638..2ac9fc855 100644 --- a/utils/phone_home_stat.php +++ b/utils/phone_home_stat.php @@ -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);