added moderation log message to warnadd2 action
plus minor error fixes
This commit is contained in:
@@ -81,7 +81,7 @@ function AddWarning()
|
|||||||
|
|
||||||
function AddWarning2()
|
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
|
// Permission
|
||||||
isAllowedTo('visual_warn_any');
|
isAllowedTo('visual_warn_any');
|
||||||
@@ -104,8 +104,11 @@ function AddWarning2()
|
|||||||
// Sort out the message.
|
// Sort out the message.
|
||||||
$message = htmlspecialchars($_REQUEST['warningmsg'], ENT_QUOTES);
|
$message = htmlspecialchars($_REQUEST['warningmsg'], ENT_QUOTES);
|
||||||
preparsecode($message);
|
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
|
SELECT ID_MEMBER, memberName, warning, emailAddress
|
||||||
FROM {$db_prefix}members
|
FROM {$db_prefix}members
|
||||||
WHERE ID_MEMBER = $_REQUEST[user] LIMIT 1", __FILE__, __LINE__);
|
WHERE ID_MEMBER = $_REQUEST[user] LIMIT 1", __FILE__, __LINE__);
|
||||||
@@ -221,9 +224,10 @@ function AddWarning2()
|
|||||||
);
|
);
|
||||||
sendpm($recs, $imsubject, $immessage, 0);
|
sendpm($recs, $imsubject, $immessage, 0);
|
||||||
}
|
}
|
||||||
if ($_REQUEST['back'] != -1)
|
/* if ($_REQUEST['back'] != -1)
|
||||||
redirectexit("$scripturl?action=$back");
|
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]");
|
redirectexit("topic=$_REQUEST[topic].msg$_REQUEST[msg]#msg$_REQUEST[msg]");
|
||||||
else
|
else
|
||||||
redirectexit();
|
redirectexit();
|
||||||
|
|||||||
Reference in New Issue
Block a user