From 01f0561cd3da6b6c9c5ecccd18e4359a65d49299 Mon Sep 17 00:00:00 2001 From: Git Date: Wed, 13 Nov 2013 08:00:59 +0000 Subject: [PATCH] Empty commit --- sections/forums/take_warn.php | 12 ++++++------ sections/forums/warn.php | 20 ++++++++++---------- sections/user/takemoderate.php | 6 +++--- 3 files changed, 19 insertions(+), 19 deletions(-) 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'); ?> -

Warning

@@ -31,26 +30,27 @@ Reason: - + Length: - + + + + - + - + + Private message: - + diff --git a/sections/user/takemoderate.php b/sections/user/takemoderate.php index cf8da6c3..ba41b44f 100644 --- a/sections/user/takemoderate.php +++ b/sections/user/takemoderate.php @@ -446,7 +446,7 @@ } if ($Warned == 1 && $Cur['Warned'] == '0000-00-00 00:00:00' && check_perms('users_warn')) { - $Weeks = 'week' . $WarnLength === 1 ? '' : 's'; + $Weeks = 'week' . ($WarnLength === 1 ? '' : 's'); Misc::send_pm($UserID, 0, 'You have received a warning', "You have been [url=".site_url()."wiki.php?action=article&id=218]warned for $WarnLength {$Weeks}[/url] by [user]".$LoggedUser['Username']."[/user]. The reason given was: [quote]{$WarnReason}[/quote]"); $UpdateSet[] = "Warned = '".sqltime()."' + INTERVAL $WarnLength WEEK"; @@ -463,7 +463,7 @@ $LightUpdates['Warned'] = '0000-00-00 00:00:00'; } elseif ($Warned == 1 && $ExtendWarning != '---' && check_perms('users_warn')) { - $Weeks = 'week' . $ExtendWarning === 1 ? '' : 's'; + $Weeks = 'week' . ($ExtendWarning === 1 ? '' : 's'); Misc::send_pm($UserID, 0, 'Your warning has been extended', "Your warning has been extended by $ExtendWarning $Weeks by [user]".$LoggedUser['Username']."[/user]. The reason given was: [quote]{$WarnReason}[/quote]"); @@ -481,7 +481,7 @@ $LightUpdates['Warned'] = $WarnedUntil; } elseif ($Warned == 1 && $ExtendWarning == '---' && $ReduceWarning != '---' && check_perms('users_warn')) { - $Weeks = 'week' . $ReduceWarning === 1 ? '' : 's'; + $Weeks = 'week' . ($ReduceWarning === 1 ? '' : 's'); Misc::send_pm($UserID, 0, 'Your warning has been reduced', "Your warning has been reduced by $ReduceWarning $Weeks by [user]".$LoggedUser['Username']."[/user]. The reason given was: [quote]{$WarnReason}[/quote]"); $UpdateSet[] = "Warned = Warned - INTERVAL $ReduceWarning WEEK";