Merge branch 'dev' into improve-auth

This commit is contained in:
Lorenzo Yario
2024-05-03 14:00:50 -07:00
committed by GitHub
8 changed files with 112 additions and 132 deletions

View File

@@ -3,6 +3,7 @@
/*
* Copyright (c) 2010-2013 Tinyboard Development Group
*/
use Vichan\Functions\Format;
use Vichan\Functions\Net;
@@ -1558,7 +1559,7 @@ function mod_ban_post($board, $delete, $post, $token = false) {
if (isset($_POST['public_message'], $_POST['message'])) {
// public ban message
$length_english = Bans::parse_time($_POST['length']) ? 'for ' . until(Bans::parse_time($_POST['length'])) : 'permanently';
$length_english = Bans::parse_time($_POST['length']) ? 'for ' . Format\until(Bans::parse_time($_POST['length'])) : 'permanently';
$_POST['message'] = preg_replace('/[\r\n]/', '', $_POST['message']);
$_POST['message'] = str_replace('%length%', $length_english, $_POST['message']);
$_POST['message'] = str_replace('%LENGTH%', strtoupper($length_english), $_POST['message']);