diff options
Diffstat (limited to 'phpBB/includes')
-rw-r--r-- | phpBB/includes/functions.php | 2 | ||||
-rwxr-xr-x | phpBB/includes/mcp/mcp_warn.php | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index 4c994881ce..4c3b0609d9 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -1806,6 +1806,8 @@ function add_log() } $db->sql_query('INSERT INTO ' . LOG_TABLE . ' ' . $db->sql_build_array('INSERT', $sql_ary)); + + return $db->sql_nextid(); } /** diff --git a/phpBB/includes/mcp/mcp_warn.php b/phpBB/includes/mcp/mcp_warn.php index d0ffb37874..b852bdf9c8 100755 --- a/phpBB/includes/mcp/mcp_warn.php +++ b/phpBB/includes/mcp/mcp_warn.php @@ -401,12 +401,12 @@ function add_warning($userrow, $warning, $send_pm = true, $post_id = 0) } add_log('admin', 'LOG_USER_WARNING', $userrow['username']); - add_log('user', $userrow['user_id'], 'LOG_USER_WARNING_BODY', $warning); + $log_id = add_log('user', $userrow['user_id'], 'LOG_USER_WARNING_BODY', $warning); $sql_ary = array( 'user_id' => $userrow['user_id'], 'post_id' => $post_id, - 'log_id' => 0, // TODO : Obtain the log_id of the warning + 'log_id' => $log_id, 'warning_time' => time(), ); |