fixed todo

This commit is contained in:
kremsy 2014-02-14 14:16:24 +01:00 committed by Steffen Schröder
parent c8cd4c0c38
commit e6f630788d

View File

@ -346,7 +346,7 @@ class MapManager implements CallbackListener {
* Updates the full Map list, needed on Init, addMap and on ShuffleMaps * Updates the full Map list, needed on Init, addMap and on ShuffleMaps
*/ */
private function updateFullMapList() { private function updateFullMapList() {
$maps = $this->maniaControl->client->getMapList(100, 0); $maps = $this->maniaControl->client->getMapList(100, 0);
$tempList = array(); $tempList = array();
foreach($maps as $rpcMap) { foreach($maps as $rpcMap) {
@ -525,6 +525,8 @@ class MapManager implements CallbackListener {
* @param $mapDir * @param $mapDir
* @param $login * @param $login
* @param $update * @param $update
* @throws \Exception
* @throws \Maniaplanet\DedicatedServer\Xmlrpc\Exception
*/ */
private function processMapFile($file, MXMapInfo $mapInfo, $mapDir, $login, $update) { private function processMapFile($file, MXMapInfo $mapInfo, $mapDir, $login, $update) {
//Check if map is already on the server //Check if map is already on the server
@ -563,9 +565,11 @@ class MapManager implements CallbackListener {
try { try {
$this->maniaControl->client->writeFileFromString($mapFileName, $file); $this->maniaControl->client->writeFileFromString($mapFileName, $file);
} catch(Exception $e) { } catch(Exception $e) {
// TODO: add check for error message - throw other stuff like connection errors if ($e->getMessage() == 'transport error - request too large!') {
$this->maniaControl->chat->sendError("Map is too big for a remote save.", $login); $this->maniaControl->chat->sendError("Map is too big for a remote save.", $login);
return; return;
}
throw $e;
} }
} }