Merge branch 'devel' of dev.sourcefabric.org:airtime into devel
This commit is contained in:
commit
3f6dc96f07
2 changed files with 16 additions and 14 deletions
|
@ -151,7 +151,7 @@ AirtimeInstall::CreateZendPhpLogFile();
|
|||
$hour = rand(0,23);
|
||||
$minute = rand(0,59);
|
||||
|
||||
$fp = fopen('/etc/cron.d/airtime-crons','a');
|
||||
$fp = fopen('/etc/cron.d/airtime-crons','w');
|
||||
fwrite($fp, "$minute $hour * * * root /usr/lib/airtime/utils/phone_home_stat\n");
|
||||
fclose($fp);
|
||||
|
||||
|
|
|
@ -55,17 +55,19 @@ if (PEAR::isError($CC_DBC)) {
|
|||
echo "* Connected to database".PHP_EOL;
|
||||
$CC_DBC->setFetchMode(DB_FETCHMODE_ASSOC);
|
||||
}
|
||||
$infoArray = Application_Model_Preference::GetSystemInfo(true);
|
||||
if(Application_Model_Preference::GetSupportFeedback() == '1'){
|
||||
$infoArray = Application_Model_Preference::GetSystemInfo(true);
|
||||
|
||||
$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');
|
||||
$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');
|
||||
|
||||
$data = json_encode($infoArray);
|
||||
$data = json_encode($infoArray);
|
||||
|
||||
$dataArray = array("data" => $data );
|
||||
$dataArray = array("data" => $data );
|
||||
|
||||
curl_setopt($ch, CURLOPT_POSTFIELDS, $dataArray);
|
||||
$result = curl_exec($ch);
|
||||
curl_setopt($ch, CURLOPT_POSTFIELDS, $dataArray);
|
||||
$result = curl_exec($ch);
|
||||
}
|
||||
?>
|
Loading…
Add table
Add a link
Reference in a new issue