use constant instead of hard-coded number
This commit is contained in:
parent
736507fccf
commit
433a088325
@ -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;
|
||||
}
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user