Changeset 6596 for trunk/include


Ignore:
Timestamp:
Jun 24, 2010, 8:36:24 PM (14 years ago)
Author:
nikrou
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/functions_comment.inc.php

    r6589 r6596  
    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.