diff options
author | Ludovic Arnaud <ludovic_arnaud@users.sourceforge.net> | 2003-02-24 23:51:26 +0000 |
---|---|---|
committer | Ludovic Arnaud <ludovic_arnaud@users.sourceforge.net> | 2003-02-24 23:51:26 +0000 |
commit | 1e5de88c6f888da18b6745975d0aa5711787781d (patch) | |
tree | 852bf35f4d9bc43560638533a85c63cf76b6549d /phpBB/includes/functions_admin.php | |
parent | 8c1004ad85e7240981ba236486af76f5d7890e04 (diff) | |
download | forums-1e5de88c6f888da18b6745975d0aa5711787781d.tar forums-1e5de88c6f888da18b6745975d0aa5711787781d.tar.gz forums-1e5de88c6f888da18b6745975d0aa5711787781d.tar.bz2 forums-1e5de88c6f888da18b6745975d0aa5711787781d.tar.xz forums-1e5de88c6f888da18b6745975d0aa5711787781d.zip |
Added topic_id field to the log_moderator table
git-svn-id: file:///svn/phpbb/trunk@3521 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/functions_admin.php')
-rw-r--r-- | phpBB/includes/functions_admin.php | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/phpBB/includes/functions_admin.php b/phpBB/includes/functions_admin.php index ba22bcd255..fed171e5a8 100644 --- a/phpBB/includes/functions_admin.php +++ b/phpBB/includes/functions_admin.php @@ -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; } |