begin Maplist widget

This commit is contained in:
kremsy
2013-12-14 22:00:59 +01:00
parent a1104c327a
commit 6bb13fb2df
7 changed files with 214 additions and 6 deletions

View File

@ -61,8 +61,10 @@ class Map {
$this->copperPrice = $rpc_infos['CopperPrice'];
$this->mapType = $rpc_infos['MapType'];
$this->mapStyle = $rpc_infos['MapStyle'];
$this->nbCheckpoints = $rpc_infos['NbCheckpoints'];
//$this->nbCheckpoints = $rpc_infos['NbCheckpoints']; //TODO check if key exists, only for trackmania
$this->authorNick = $this->authorLogin; //initialize (if nick from map cant get readen)
$mapsDirectory = $this->maniaControl->server->getMapsDirectory();
if ($this->maniaControl->server->checkAccess($mapsDirectory)) {
$this->mapFetcher = new \GBXChallMapFetcher(true);
@ -72,12 +74,13 @@ class Map {
catch (\Exception $e) {
trigger_error($e->getMessage(), E_USER_WARNING);
}
$this->authorNick = $this->mapFetcher->authorNick;
$this->authorEInfo = $this->mapFetcher->authorEInfo;
$this->authorZone = $this->mapFetcher->authorZone;
$this->comment = $this->mapFetcher->comment;
}
// TODO: define timeout if mx is down
$serverInfo = $this->maniaControl->server->getSystemInfo();
$title = strtoupper(substr($serverInfo['TitleId'], 0, 2));