Ignore:
Timestamp:
Jun 24, 2010, 10:35:46 PM (14 years ago)
Author:
nikrou
Message:

Bug 1735 fixed : merge from trunk
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 (with permissions filter)

Fixed also problem of FROM_UNIXTIME function not POstgreSQL compatible

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.1/include/functions_comment.inc.php

    r6590 r6602  
    134134  if ($comment_action!='reject' and $conf['anti-flood_time']>0 )
    135135  { // anti-flood system
    136     $reference_date = time() - $conf['anti-flood_time'];
     136    $reference_date = date('c', time() - $conf['anti-flood_time']);
    137137    $query = '
    138138SELECT id FROM '.COMMENTS_TABLE.'
    139   WHERE date > FROM_UNIXTIME('.$reference_date.')
     139  WHERE date > \''.$reference_date.'\'
    140140    AND author_id = '.$comm['author_id'];
    141141    if ( pwg_db_num_rows( pwg_query( $query ) ) > 0 )
Note: See TracChangeset for help on using the changeset viewer.