Changeset 6605 for branches/2.1/include/functions_comment.inc.php
- Timestamp:
- Jun 25, 2010, 9:45:19 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.1/include/functions_comment.inc.php
r6602 r6605 134 134 if ($comment_action!='reject' and $conf['anti-flood_time']>0 ) 135 135 { // anti-flood system 136 $reference_date = date('c', time() - $conf['anti-flood_time']); 136 $reference_date = pwg_db_get_flood_period_expression($conf['anti-flood_time']); 137 137 138 $query = ' 138 SELECT idFROM '.COMMENTS_TABLE.'139 WHERE date > \''.$reference_date.'\'139 SELECT count(1) FROM '.COMMENTS_TABLE.' 140 WHERE date > '.$reference_date.' 140 141 AND author_id = '.$comm['author_id']; 141 if ( pwg_db_num_rows( pwg_query( $query ) ) > 0 ) 142 list($counter) = pwg_db_fetch_row(pwg_query($query)); 143 if ( $counter > 0 ) 142 144 { 143 145 array_push( $infos, l10n('Anti-flood system : please wait for a moment before trying to post another comment') );
Note: See TracChangeset
for help on using the changeset viewer.