mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-05 16:27:38 +02: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:
@@ -1182,9 +1182,10 @@ if( ( $submit || $confirm || $mode == "delete" ) && !$error )
|
||||
//
|
||||
// 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
|
||||
FROM " . POSTS_TABLE . "
|
||||
WHERE poster_ip = '$user_ip'";
|
||||
WHERE $where_sql";
|
||||
if($result = $db->sql_query($sql))
|
||||
{
|
||||
$db_row = $db->sql_fetchrow($result);
|
||||
|
Reference in New Issue
Block a user