1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-02-15 21:44:56 +01:00

We now return the log_id of newly created logs. This is used by the warnings code and may prove to be of use elsewhere or in MODs

git-svn-id: file:///svn/phpbb/trunk@5631 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Graham Eames 2006-03-14 20:35:19 +00:00
parent 5f0f004a0f
commit 8c3f94f9ae
2 changed files with 4 additions and 2 deletions

View File

@ -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();
}
/**

View File

@ -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(),
);