mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-12 22:38:52 +00:00
Fix for bug #494982, uses IP for anonymous posters and user_id for logged in users
git-svn-id: file:///svn/phpbb/trunk@1632 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
3d33692557
commit
cc3d50adbb
1 changed files with 2 additions and 1 deletions
|
@ -1182,9 +1182,10 @@ if( ( $submit || $confirm || $mode == "delete" ) && !$error )
|
||||||
//
|
//
|
||||||
// Flood control
|
// Flood control
|
||||||
//
|
//
|
||||||
|
$where_sql = ( $userdata['user_id'] == ANONYMOUS ) ? "poster_ip = '$user_ip'" : "poster_id = " . $userdata['user_id'];
|
||||||
$sql = "SELECT MAX(post_time) AS last_post_time
|
$sql = "SELECT MAX(post_time) AS last_post_time
|
||||||
FROM " . POSTS_TABLE . "
|
FROM " . POSTS_TABLE . "
|
||||||
WHERE poster_ip = '$user_ip'";
|
WHERE $where_sql";
|
||||||
if($result = $db->sql_query($sql))
|
if($result = $db->sql_query($sql))
|
||||||
{
|
{
|
||||||
$db_row = $db->sql_fetchrow($result);
|
$db_row = $db->sql_fetchrow($result);
|
||||||
|
|
Loading…
Add table
Reference in a new issue