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\Quad;
|
||||||
use FML\Controls\Quads\Quad_Icons64x64_1;
|
use FML\Controls\Quads\Quad_Icons64x64_1;
|
||||||
use FML\Controls\Quads\Quad_UIConstruction_Buttons;
|
use FML\Controls\Quads\Quad_UIConstruction_Buttons;
|
||||||
|
use ManiaControl\Admin\AuthenticationManager;
|
||||||
use ManiaControl\Callbacks\CallbackListener;
|
use ManiaControl\Callbacks\CallbackListener;
|
||||||
use ManiaControl\Callbacks\CallbackManager;
|
use ManiaControl\Callbacks\CallbackManager;
|
||||||
use ManiaControl\Commands\CommandListener;
|
use ManiaControl\Commands\CommandListener;
|
||||||
@ -247,7 +248,7 @@ class MapCommands implements CommandListener, ManialinkPageAnswerListener, Callb
|
|||||||
* @param \ManiaControl\Players\Player $player
|
* @param \ManiaControl\Players\Player $player
|
||||||
*/
|
*/
|
||||||
public function command_WriteMapList(array $chat, 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);
|
$this->maniaControl->authenticationManager->sendNotAllowed($player);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -282,7 +283,7 @@ class MapCommands implements CommandListener, ManialinkPageAnswerListener, Callb
|
|||||||
* @param \ManiaControl\Players\Player $player
|
* @param \ManiaControl\Players\Player $player
|
||||||
*/
|
*/
|
||||||
public function command_ReadMapList(array $chat, 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);
|
$this->maniaControl->authenticationManager->sendNotAllowed($player);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -166,7 +166,6 @@ class MapManager implements CallbackListener {
|
|||||||
mxid = 0,
|
mxid = 0,
|
||||||
changed = NOW()
|
changed = NOW()
|
||||||
WHERE 'uid' = ?";
|
WHERE 'uid' = ?";
|
||||||
|
|
||||||
$mapStatement = $mysqli->prepare($mapQuery);
|
$mapStatement = $mysqli->prepare($mapQuery);
|
||||||
if ($mysqli->error) {
|
if ($mysqli->error) {
|
||||||
trigger_error($mysqli->error);
|
trigger_error($mysqli->error);
|
||||||
|
Loading…
Reference in New Issue
Block a user