Empty commit

This commit is contained in:
Git 2013-11-13 08:00:59 +00:00
parent bef5cd9ec8
commit 01f0561cd3
3 changed files with 19 additions and 19 deletions

View File

@ -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,11 +19,11 @@
}
$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";

View File

@ -16,7 +16,6 @@
list($PostBody, $ForumID) = $DB -> next_record();
View::show_header('Warn User');
?>
<div class="thin">
<div class="header">
<h2>Warning <a href="user.php?id=<?=$UserID?>"><?=$UserInfo['Username']?></a></h2>
@ -45,7 +44,8 @@
<? if (check_perms('users_mod')) { ?>
<option value="8">8 weeks</option>
<? } ?>
</select></td>
</select>
</td>
</tr>
<tr>
<td class="label">Private message:</td>

View File

@ -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&amp;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";