resolved some todos

This commit is contained in:
kremsy 2014-01-31 14:48:24 +01:00 committed by Steffen Schröder
parent 2b3dd3ec7f
commit 8fede6f508
3 changed files with 5 additions and 12 deletions

View File

@ -5,7 +5,6 @@ namespace ManiaControl\ManiaExchange;
use FML\Controls\Control; use FML\Controls\Control;
use FML\Controls\Entry; use FML\Controls\Entry;
use FML\Controls\Frame; use FML\Controls\Frame;
use FML\Controls\Label;
use FML\Controls\Labels\Label_Button; use FML\Controls\Labels\Label_Button;
use FML\Controls\Labels\Label_Text; use FML\Controls\Labels\Label_Text;
use FML\Controls\Quad; use FML\Controls\Quad;
@ -21,7 +20,7 @@ use ManiaControl\Manialinks\IconManager;
use ManiaControl\Manialinks\ManialinkManager; use ManiaControl\Manialinks\ManialinkManager;
use ManiaControl\Manialinks\ManialinkPageAnswerListener; use ManiaControl\Manialinks\ManialinkPageAnswerListener;
use ManiaControl\Maps\MapCommands; use ManiaControl\Maps\MapCommands;
use ManiaControl\Maps\MapManager; use ManiaControl\Maps\MapQueue;
use ManiaControl\Players\Player; use ManiaControl\Players\Player;
@ -188,8 +187,7 @@ class ManiaExchangeList implements CallbackListener, ManialinkPageAnswerListener
$mxQuad->setZ(0.01); $mxQuad->setZ(0.01);
$script->addTooltip($mxQuad, $descriptionLabel, array(Script::OPTION_TOOLTIP_TEXT => "View " . $map->name . " on Mania-Exchange")); $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, MapQueue::SETTING_PERMISSION_CLEAR_MAPQUEUE)) {
if ($this->maniaControl->authenticationManager->checkPermission($player, MapManager::SETTING_PERMISSION_ADD_MAP)) {
$addQuad = new Quad_Icons64x64_1(); $addQuad = new Quad_Icons64x64_1();
$mapFrame->add($addQuad); $mapFrame->add($addQuad);
$addQuad->setX($x + 59); $addQuad->setX($x + 59);

View File

@ -176,12 +176,6 @@ class MapManager implements CallbackListener {
public function updateMap(Player $admin, $uid) { public function updateMap(Player $admin, $uid) {
$this->updateMapTimestamp($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)) { if (!isset($uid)) {
trigger_error("Error while updating Map, unkown UID: " . $uid); trigger_error("Error while updating Map, unkown UID: " . $uid);
$this->maniaControl->chat->sendError("Error while updating Map.", $admin->login); $this->maniaControl->chat->sendError("Error while updating Map.", $admin->login);
@ -535,6 +529,7 @@ class MapManager implements CallbackListener {
$mapFileName = $downloadDirectory . '/' . $fileName; $mapFileName = $downloadDirectory . '/' . $fileName;
var_dump($mapDir);
//Check if it can get locally Written //Check if it can get locally Written
if (is_dir($mapDir)) { if (is_dir($mapDir)) {
// Create download directory if necessary // Create download directory if necessary

View File

@ -190,12 +190,12 @@ class PlayerList implements ManialinkPageAnswerListener, CallbackListener, Timer
$specQuad->setSize(3.8, 3.8); $specQuad->setSize(3.8, 3.8);
} }
if (!$listPlayer->isFakePlayer()) { $countryCode = Formatter::mapCountry($listPlayer->getCountry());
if ($countryCode != 'OTH') {
// Nation Quad // Nation Quad
$countryQuad = new Quad(); $countryQuad = new Quad();
$playerFrame->add($countryQuad); $playerFrame->add($countryQuad);
$countryCode = Formatter::mapCountry($listPlayer->getCountry()); $countryCode = Formatter::mapCountry($listPlayer->getCountry());
//TODO fix on other
$countryQuad->setImage("file://Skins/Avatars/Flags/{$countryCode}.dds"); $countryQuad->setImage("file://Skins/Avatars/Flags/{$countryCode}.dds");
$countryQuad->setX($x + 98); $countryQuad->setX($x + 98);
$countryQuad->setSize(4, 4); $countryQuad->setSize(4, 4);