diff --git a/sections/forums/take_warn.php b/sections/forums/take_warn.php index c82c6d1a..4acf9b4f 100644 --- a/sections/forums/take_warn.php +++ b/sections/forums/take_warn.php @@ -7,7 +7,7 @@ $Reason = $_POST['reason']; $PrivateMessage = $_POST['privatemessage']; $Body = $_POST['body']; -$Length = $_POST['length']; +$WarningLength = $_POST['length']; $PostID = (int)$_POST['postid']; $UserID = (int)$_POST['userid']; $Key = (int)$_POST['key']; @@ -19,19 +19,19 @@ } $URL = site_url() . "forums.php?action=viewthread&postid=$PostID#post$PostID"; -if ($Length != 'verbal') { - $Time = ((int)$Length) * (7 * 24 * 60 * 60); +if ($WarningLength !== 'verbal') { + $Time = (int)$WarningLength * (7 * 24 * 60 * 60); Tools::warn_user($UserID, $Time, "$URL - $Reason"); $Subject = 'You have received a warning'; - $PrivateMessage = "You have received a $Length week warning for [url=$URL]this post[/url].\n\n" . $PrivateMessage; + $PrivateMessage = "You have received a $WarningLength week warning for [url=$URL]this post[/url].\n\n" . $PrivateMessage; $WarnTime = time_plus($Time); - $AdminComment = date('Y-m-d') . " - Warned until $WarnTime by " . $LoggedUser['Username'] . " for $URL \nReason: $Reason\n\n"; + $AdminComment = date('Y-m-d') . " - Warned until $WarnTime by " . $LoggedUser['Username'] . " for $URL\nReason: $Reason\n\n"; } else { $Subject = 'You have received a verbal warning'; $PrivateMessage = "You have received a verbal warning for [url=$URL]this post[/url].\n\n" . $PrivateMessage; - $AdminComment = date('Y-m-d') . ' - Verbally warned by ' . $LoggedUser['Username'] . " for $URL \nReason: $Reason\n\n"; + $AdminComment = date('Y-m-d') . ' - Verbally warned by ' . $LoggedUser['Username'] . " for $URL\nReason: $Reason\n\n"; Tools::update_user_notes($UserID, $AdminComment); } diff --git a/sections/forums/warn.php b/sections/forums/warn.php index 1e7735d2..738f251d 100644 --- a/sections/forums/warn.php +++ b/sections/forums/warn.php @@ -16,7 +16,6 @@ list($PostBody, $ForumID) = $DB -> next_record(); View::show_header('Warn User'); ?> -