Bug 1735 fixed : Comment page is not PostgreSQL compatible
Fixed by adding all fields except category_id in group by clause category_id is retrieved later in an another query. Fixed also problem of FROM_UNIXTIME function not POstgreSQL compatible. git-svn-id: http://piwigo.org/svn/trunk@6596 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
parent
ad07b1c50b
commit
e1ecc62b83
2 changed files with 25 additions and 18 deletions
|
|
@ -133,10 +133,10 @@ SELECT COUNT(*) AS user_exists
|
|||
|
||||
if ($comment_action!='reject' and $conf['anti-flood_time']>0 )
|
||||
{ // anti-flood system
|
||||
$reference_date = time() - $conf['anti-flood_time'];
|
||||
$reference_date = date('c', time() - $conf['anti-flood_time']);
|
||||
$query = '
|
||||
SELECT id FROM '.COMMENTS_TABLE.'
|
||||
WHERE date > FROM_UNIXTIME('.$reference_date.')
|
||||
WHERE date > \''.$reference_date.'\'
|
||||
AND author_id = '.$comm['author_id'];
|
||||
if ( pwg_db_num_rows( pwg_query( $query ) ) > 0 )
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue