removed old php 5.3 compatibility code

This commit is contained in:
Steffen Schröder
2014-06-17 23:27:28 +02:00
parent ea223a6d26
commit 2e0a0359dd
11 changed files with 205 additions and 235 deletions

View File

@ -75,12 +75,11 @@ class UsageReporter implements TimerListener {
$json = json_encode($properties);
$info = base64_encode($json);
$url = ManiaControl::URL_WEBSERVICE . '/usagereport?info=' . urlencode($info);
$self = $this;
$this->maniaControl->fileReader->loadFile($url, function ($response, $error) use (&$self) {
$url = ManiaControl::URL_WEBSERVICE . '/usagereport?info=' . urlencode($info);
$this->maniaControl->fileReader->loadFile($url, function ($response, $error) {
$response = json_decode($response);
if ($error || !$response) {
$self->maniaControl->log('Error while Sending data: ' . print_r($error, true));
$this->maniaControl->log('Error while Sending data: ' . print_r($error, true));
}
});
}