From 433a0883250abd0c6e7904e4859d9dbbd2d454af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Steffen=20Schro=CC=88der?= Date: Tue, 27 May 2014 23:18:56 +0200 Subject: [PATCH] use constant instead of hard-coded number --- application/core/Maps/MapCommands.php | 5 +++-- application/core/Maps/MapManager.php | 1 - 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/application/core/Maps/MapCommands.php b/application/core/Maps/MapCommands.php index 229118ec..f450549a 100644 --- a/application/core/Maps/MapCommands.php +++ b/application/core/Maps/MapCommands.php @@ -5,6 +5,7 @@ namespace ManiaControl\Maps; use FML\Controls\Quad; use FML\Controls\Quads\Quad_Icons64x64_1; use FML\Controls\Quads\Quad_UIConstruction_Buttons; +use ManiaControl\Admin\AuthenticationManager; use ManiaControl\Callbacks\CallbackListener; use ManiaControl\Callbacks\CallbackManager; use ManiaControl\Commands\CommandListener; @@ -247,7 +248,7 @@ class MapCommands implements CommandListener, ManialinkPageAnswerListener, Callb * @param \ManiaControl\Players\Player $player */ public function command_WriteMapList(array $chat, Player $player) { - if (!$this->maniaControl->authenticationManager->checkRight($player, 3)) { + if (!$this->maniaControl->authenticationManager->checkRight($player, AuthenticationManager::AUTH_LEVEL_SUPERADMIN)) { $this->maniaControl->authenticationManager->sendNotAllowed($player); return; } @@ -282,7 +283,7 @@ class MapCommands implements CommandListener, ManialinkPageAnswerListener, Callb * @param \ManiaControl\Players\Player $player */ public function command_ReadMapList(array $chat, Player $player) { - if (!$this->maniaControl->authenticationManager->checkRight($player, 3)) { + if (!$this->maniaControl->authenticationManager->checkRight($player, AuthenticationManager::AUTH_LEVEL_SUPERADMIN)) { $this->maniaControl->authenticationManager->sendNotAllowed($player); return; } diff --git a/application/core/Maps/MapManager.php b/application/core/Maps/MapManager.php index 0e807b1b..8b768305 100644 --- a/application/core/Maps/MapManager.php +++ b/application/core/Maps/MapManager.php @@ -166,7 +166,6 @@ class MapManager implements CallbackListener { mxid = 0, changed = NOW() WHERE 'uid' = ?"; - $mapStatement = $mysqli->prepare($mapQuery); if ($mysqli->error) { trigger_error($mysqli->error);