From 49104b4e63626b3ddde2c8290ec726cce6586f88 Mon Sep 17 00:00:00 2001 From: kremsy Date: Thu, 27 Feb 2014 23:09:19 +0100 Subject: [PATCH] cleanups --- application/core/ManiaExchange/ManiaExchangeManager.php | 7 ++----- application/plugins/Dedimania/Dedimania.php | 3 +-- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/application/core/ManiaExchange/ManiaExchangeManager.php b/application/core/ManiaExchange/ManiaExchangeManager.php index 1e2362e3..431ce167 100644 --- a/application/core/ManiaExchange/ManiaExchangeManager.php +++ b/application/core/ManiaExchange/ManiaExchangeManager.php @@ -299,7 +299,7 @@ class ManiaExchangeManager { //dont append map type } - $fileFunc = function ($mapInfo, $error) use (&$function, $titlePrefix) { + $success = $this->maniaControl->fileReader->loadFile($url, function ($mapInfo, $error) use (&$function, $titlePrefix) { if ($error) { trigger_error($error); return null; @@ -319,11 +319,8 @@ class ManiaExchangeManager { } call_user_func($function, $maps); - return true; - }; - - $success = $this->maniaControl->fileReader->loadFile($url, $fileFunc, "application/json"); + }, "application/json"); return $success; } diff --git a/application/plugins/Dedimania/Dedimania.php b/application/plugins/Dedimania/Dedimania.php index 3e9331c8..90ad7e57 100644 --- a/application/plugins/Dedimania/Dedimania.php +++ b/application/plugins/Dedimania/Dedimania.php @@ -419,9 +419,8 @@ class Dedimania implements CallbackListener, TimerListener, Plugin { // Save time $newRecord = new RecordData(null); $newRecord->constructNewRecord($login, $player->nickname, $data[2], $this->getCheckpoints($login), true); - var_dump($oldRecord, $newRecord); //TODO remvoe if ($this->insertDedimaniaRecord($newRecord, $oldRecord)) { - var_dump("test1234"); + // Get newly saved record foreach($this->dedimaniaData->records as &$record) { /** @var RecordData $record */