1
0
mirror of https://github.com/vichan-devel/vichan.git synced 2025-02-17 11:28:41 +01:00

Fix leading whitespace in post.php

This commit is contained in:
Zankaria 2024-01-29 22:57:45 +01:00
parent f45bc768fe
commit 15cce3a31f

View File

@ -332,7 +332,6 @@ if (isset($_POST['delete'])) {
$post = $query->fetch(PDO::FETCH_ASSOC);
$error = event('report', array('ip' => $_SERVER['REMOTE_ADDR'], 'board' => $board['uri'], 'post' => $post, 'reason' => $reason, 'link' => link_for($post)));
if ($error) {
error($error);
}
@ -795,13 +794,12 @@ if (isset($_POST['delete'])) {
}
}
if ($config['user_flag'] && isset($_POST['user_flag']))
if (!empty($_POST['user_flag']) ){
if ($config['user_flag'] && isset($_POST['user_flag']) && !empty($_POST['user_flag'])) {
$user_flag = $_POST['user_flag'];
if (!isset($config['user_flags'][$user_flag]))
if (!isset($config['user_flags'][$user_flag])) {
error(_('Invalid flag selection!'));
}
$flag_alt = isset($user_flag_alt) ? $user_flag_alt : $config['user_flags'][$user_flag];