mirror of
https://github.com/slawkens/myaac.git
synced 2025-10-14 09:44:55 +02:00
Fixes regarding csrf + refactor some parts of AAC (guilds + forum)
Replace $account_logged->getPlayers() with getPlayersList() $_REQUEST['todo'] -> $_REQUEST['post'] $guild_errors -> $errors
This commit is contained in:
@@ -18,22 +18,22 @@ if ($ret === false) {
|
||||
return;
|
||||
}
|
||||
|
||||
csrfProtect();
|
||||
|
||||
if(!$logged) {
|
||||
echo 'You are not logged in. <a href="' . getLink('account/manage') . '?redirect=' . urlencode(getLink('forum')) . '">Log in</a> to post on the forum.<br /><br />';
|
||||
return;
|
||||
}
|
||||
|
||||
csrfProtect();
|
||||
|
||||
if(!Forum::isModerator()) {
|
||||
echo 'You are not logged in or you are not moderator.';
|
||||
return;
|
||||
}
|
||||
|
||||
$save = isset($_REQUEST['save']) && (int)$_REQUEST['save'] == 1;
|
||||
$save = isset($_POST['save']) && (int)$_POST['save'] == 1;
|
||||
if($save) {
|
||||
$post_id = (int)$_REQUEST['id'];
|
||||
$board = (int)$_REQUEST['section'];
|
||||
$post_id = (int)$_POST['id'];
|
||||
$board = (int)$_POST['section'];
|
||||
if(!Forum::hasAccess($board)) {
|
||||
$errors[] = "You don't have access to this board.";
|
||||
displayErrorBoxWithBackButton($errors, getLink('forum'));
|
||||
|
Reference in New Issue
Block a user