|
From: Paul S. O. <ps...@us...> - 2001-12-19 14:12:54
|
Update of /cvsroot/phpbb/phpBB2
In directory usw-pr-cvs1:/tmp/cvs-serv30429
Modified Files:
posting.php
Log Message:
Fix for bug #494982, uses IP for anonymous posters and user_id for logged in users
Index: posting.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/posting.php,v
retrieving revision 1.128
retrieving revision 1.129
diff -C2 -r1.128 -r1.129
*** posting.php 2001/12/18 20:35:17 1.128
--- posting.php 2001/12/19 14:12:51 1.129
***************
*** 1183,1189 ****
// Flood control
//
$sql = "SELECT MAX(post_time) AS last_post_time
FROM " . POSTS_TABLE . "
! WHERE poster_ip = '$user_ip'";
if($result = $db->sql_query($sql))
{
--- 1183,1190 ----
// 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 $where_sql";
if($result = $db->sql_query($sql))
{
|