cleanups
This commit is contained in:
parent
e0c9ffd742
commit
49104b4e63
@ -299,7 +299,7 @@ class ManiaExchangeManager {
|
|||||||
//dont append map type
|
//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) {
|
if ($error) {
|
||||||
trigger_error($error);
|
trigger_error($error);
|
||||||
return null;
|
return null;
|
||||||
@ -319,11 +319,8 @@ class ManiaExchangeManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
call_user_func($function, $maps);
|
call_user_func($function, $maps);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
};
|
}, "application/json");
|
||||||
|
|
||||||
$success = $this->maniaControl->fileReader->loadFile($url, $fileFunc, "application/json");
|
|
||||||
|
|
||||||
return $success;
|
return $success;
|
||||||
}
|
}
|
||||||
|
@ -419,9 +419,8 @@ class Dedimania implements CallbackListener, TimerListener, Plugin {
|
|||||||
// Save time
|
// Save time
|
||||||
$newRecord = new RecordData(null);
|
$newRecord = new RecordData(null);
|
||||||
$newRecord->constructNewRecord($login, $player->nickname, $data[2], $this->getCheckpoints($login), true);
|
$newRecord->constructNewRecord($login, $player->nickname, $data[2], $this->getCheckpoints($login), true);
|
||||||
var_dump($oldRecord, $newRecord); //TODO remvoe
|
|
||||||
if ($this->insertDedimaniaRecord($newRecord, $oldRecord)) {
|
if ($this->insertDedimaniaRecord($newRecord, $oldRecord)) {
|
||||||
var_dump("test1234");
|
|
||||||
// Get newly saved record
|
// Get newly saved record
|
||||||
foreach($this->dedimaniaData->records as &$record) {
|
foreach($this->dedimaniaData->records as &$record) {
|
||||||
/** @var RecordData $record */
|
/** @var RecordData $record */
|
||||||
|
Loading…
Reference in New Issue
Block a user