pages.php: slightly better ip error

This commit is contained in:
Zankaria 2024-12-27 19:43:22 +01:00
parent d4781d6f00
commit 0c23445d72

View file

@ -854,7 +854,7 @@ function mod_ip_remove_note(Context $ctx, $ip, $id) {
error($config['error']['noaccess']);
if (filter_var($ip, FILTER_VALIDATE_IP) === false)
error("Invalid IP address.");
error('Invalid IP address');
$query = prepare('DELETE FROM ``ip_notes`` WHERE `ip` = :ip AND `id` = :id');
$query->bindValue(':ip', $ip);
@ -870,7 +870,7 @@ function mod_ip(Context $ctx, $ip, string $encoded_cursor = null) {
global $config, $mod;
if (filter_var($ip, FILTER_VALIDATE_IP) === false)
error("Invalid IP address.");
error('Invalid IP address');
if (isset($_POST['ban_id'], $_POST['unban'])) {
if (!hasPermission($config['mod']['unban']))
@ -922,7 +922,7 @@ function mod_user_posts_by_ip(Context $ctx, string $ip, string $encoded_cursor =
global $mod;
if (\filter_var($ip, \FILTER_VALIDATE_IP) === false){
error("Invalid IP address.");
error('Invalid IP address');
}
$config = $ctx->get('config');