added moderation log message to warnadd2 action

plus minor error fixes
This commit is contained in:
Aleksei Miheev
2011-12-24 20:29:46 +04:00
parent bab7c635b6
commit 1be045af4b

View File

@@ -81,7 +81,7 @@ function AddWarning()
function AddWarning2()
{
global $scripturl, $db_prefix, $settings, $modSettings, $txt, $sourcedir, $forum_version;
global $scripturl, $db_prefix, $settings, $modSettings, $txt, $sourcedir, $forum_version, $user_info;
// Permission
isAllowedTo('visual_warn_any');
@@ -104,8 +104,11 @@ function AddWarning2()
// Sort out the message.
$message = htmlspecialchars($_REQUEST['warningmsg'], ENT_QUOTES);
preparsecode($message);
$request = db_query("
// update moderation log
logAction("vwarning", array('user' => $_REQUEST['user'], 'level' => $_REQUEST['level'], $message));
$request = db_query("
SELECT ID_MEMBER, memberName, warning, emailAddress
FROM {$db_prefix}members
WHERE ID_MEMBER = $_REQUEST[user] LIMIT 1", __FILE__, __LINE__);
@@ -221,9 +224,10 @@ function AddWarning2()
);
sendpm($recs, $imsubject, $immessage, 0);
}
if ($_REQUEST['back'] != -1)
/* if ($_REQUEST['back'] != -1)
redirectexit("$scripturl?action=$back");
elseif ($_REQUEST['msg'] != -1 && $_REQUEST['topic'] != -1)
else*/
if ($_REQUEST['msg'] != -1 && $_REQUEST['topic'] != -1)
redirectexit("topic=$_REQUEST[topic].msg$_REQUEST[msg]#msg$_REQUEST[msg]");
else
redirectexit();