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);