map file erasing from browser

This commit is contained in:
steeffeen
2014-07-05 14:05:23 +02:00
parent 9fde082a71
commit 9e4f815278
2 changed files with 15 additions and 5 deletions

View File

@ -713,10 +713,16 @@ class MapManager implements CallbackListener {
$this->maniaControl->callbackManager->triggerCallback(Callbacks::ENDMAP, $this->currentMap);
}
/**
* Fetch a map by its file path
*
* @param string $relativeFileName
* @return Map
*/
public function fetchMapByFileName($relativeFileName) {
$mapInfo = $this->maniaControl->client->getMapInfo($relativeFileName);
if (!$mapInfo) {
return false;
return null;
}
return $this->initializeMap($mapInfo);
}