mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-25 19:38:53 +00: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:
parent
8c1004ad85
commit
1e5de88c6f
2 changed files with 15 additions and 3 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -245,12 +245,14 @@ CREATE TABLE phpbb_log_moderator (
|
|||
log_id mediumint(5) UNSIGNED NOT NULL DEFAULT '0' auto_increment,
|
||||
user_id mediumint(8) NOT NULL DEFAULT '0',
|
||||
forum_id mediumint(8) UNSIGNED NOT NULL DEFAULT '0',
|
||||
topic_id mediumint(8) UNSIGNED NOT NULL DEFAULT '0',
|
||||
log_ip varchar(40) NOT NULL,
|
||||
log_time int(11) NOT NULL,
|
||||
log_operation text,
|
||||
log_data text,
|
||||
PRIMARY KEY (log_id),
|
||||
KEY forum_id (forum_id),
|
||||
KEY topic_id (forum_id),
|
||||
KEY user_id (user_id)
|
||||
);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue