diff --git a/application/core/ManiaExchange/ManiaExchangeList.php b/application/core/ManiaExchange/ManiaExchangeList.php index 4f8dc6ae..bed09cb0 100644 --- a/application/core/ManiaExchange/ManiaExchangeList.php +++ b/application/core/ManiaExchange/ManiaExchangeList.php @@ -5,7 +5,6 @@ namespace ManiaControl\ManiaExchange; use FML\Controls\Control; use FML\Controls\Entry; use FML\Controls\Frame; -use FML\Controls\Label; use FML\Controls\Labels\Label_Button; use FML\Controls\Labels\Label_Text; use FML\Controls\Quad; @@ -21,7 +20,7 @@ use ManiaControl\Manialinks\IconManager; use ManiaControl\Manialinks\ManialinkManager; use ManiaControl\Manialinks\ManialinkPageAnswerListener; use ManiaControl\Maps\MapCommands; -use ManiaControl\Maps\MapManager; +use ManiaControl\Maps\MapQueue; use ManiaControl\Players\Player; @@ -188,8 +187,7 @@ class ManiaExchangeList implements CallbackListener, ManialinkPageAnswerListener $mxQuad->setZ(0.01); $script->addTooltip($mxQuad, $descriptionLabel, array(Script::OPTION_TOOLTIP_TEXT => "View " . $map->name . " on Mania-Exchange")); - //TODO permission Clear Jukebox - if ($this->maniaControl->authenticationManager->checkPermission($player, MapManager::SETTING_PERMISSION_ADD_MAP)) { + if ($this->maniaControl->authenticationManager->checkPermission($player, MapQueue::SETTING_PERMISSION_CLEAR_MAPQUEUE)) { $addQuad = new Quad_Icons64x64_1(); $mapFrame->add($addQuad); $addQuad->setX($x + 59); diff --git a/application/core/Maps/MapManager.php b/application/core/Maps/MapManager.php index d6e34480..fa941afd 100644 --- a/application/core/Maps/MapManager.php +++ b/application/core/Maps/MapManager.php @@ -176,12 +176,6 @@ class MapManager implements CallbackListener { public function updateMap(Player $admin, $uid) { $this->updateMapTimestamp($uid); - $mapsDirectory = $this->maniaControl->server->getMapsDirectory(); - if (!$this->maniaControl->server->checkAccess($mapsDirectory)) { - $this->maniaControl->chat->sendError("ManiaControl doesn't have access to the maps directory.", $admin->login); - return; - } - if (!isset($uid)) { trigger_error("Error while updating Map, unkown UID: " . $uid); $this->maniaControl->chat->sendError("Error while updating Map.", $admin->login); @@ -535,6 +529,7 @@ class MapManager implements CallbackListener { $mapFileName = $downloadDirectory . '/' . $fileName; + var_dump($mapDir); //Check if it can get locally Written if (is_dir($mapDir)) { // Create download directory if necessary diff --git a/application/core/Players/PlayerList.php b/application/core/Players/PlayerList.php index 1f00859d..2e9ee449 100644 --- a/application/core/Players/PlayerList.php +++ b/application/core/Players/PlayerList.php @@ -190,12 +190,12 @@ class PlayerList implements ManialinkPageAnswerListener, CallbackListener, Timer $specQuad->setSize(3.8, 3.8); } - if (!$listPlayer->isFakePlayer()) { + $countryCode = Formatter::mapCountry($listPlayer->getCountry()); + if ($countryCode != 'OTH') { // Nation Quad $countryQuad = new Quad(); $playerFrame->add($countryQuad); $countryCode = Formatter::mapCountry($listPlayer->getCountry()); - //TODO fix on other $countryQuad->setImage("file://Skins/Avatars/Flags/{$countryCode}.dds"); $countryQuad->setX($x + 98); $countryQuad->setSize(4, 4);