mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-04 07:47:34 +02:00
Added topic_id field to the log_moderator table
git-svn-id: file:///svn/phpbb/trunk@3521 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
@@ -329,7 +329,7 @@ function remove_remarks($sql)
|
||||
{
|
||||
if ($i != $linecount - 1 || strlen($lines[$i]) > 0)
|
||||
{
|
||||
$output .= ($lines[$i][0] != '#') ? $lines[$i] . "\n" : "\n";
|
||||
$output .= ($lines[$i]{0} != '#') ? $lines[$i] . "\n" : "\n";
|
||||
// Trading a bit of speed for lower mem. use here.
|
||||
$lines[$i] = '';
|
||||
}
|
||||
@@ -740,12 +740,22 @@ function add_log()
|
||||
|
||||
$mode = array_shift($args);
|
||||
$forum_id = ($mode == 'mod') ? intval(array_shift($args)) : '';
|
||||
$topic_id = ($mode == 'mod') ? intval(array_shift($args)) : '';
|
||||
$action = array_shift($args);
|
||||
$data = (!sizeof($args)) ? '' : addslashes(serialize($args));
|
||||
|
||||
$sql = ($mode == 'admin') ? "INSERT INTO " . LOG_ADMIN_TABLE . " (user_id, log_ip, log_time, log_operation, log_data) VALUES (" . $user->data['user_id'] . ", '$user->ip', " . time() . ", '$action', '$data')" : "INSERT INTO " . LOG_MOD_TABLE . " (user_id, forum_id, log_ip, log_time, log_operation, log_data) VALUES (" . $user->data['user_id'] . ", $forum_id, '$user->ip', " . time() . ", '$action', '$data')";
|
||||
$db->sql_query($sql);
|
||||
if ($mode == 'admin')
|
||||
{
|
||||
$sql = 'INSERT INTO ' . LOG_ADMIN_TABLE . ' (user_id, log_ip, log_time, log_operation, log_data)
|
||||
VALUES (' . $user->data['user_id'] . ", '$user->ip', " . time() . ", '$action', '$data')";
|
||||
}
|
||||
else
|
||||
{
|
||||
$sql = 'INSERT INTO ' . LOG_MOD_TABLE . ' (user_id, forum_id, topic_id, log_ip, log_time, log_operation, log_data)
|
||||
VALUES (' . $user->data['user_id'] . ", $forum_id, $topic_id, '$user->ip', " . time() . ", '$action', '$data')";
|
||||
}
|
||||
|
||||
$db->sql_query($sql);
|
||||
return;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user