aboutsummaryrefslogtreecommitdiffstats
path: root/include/functions_comment.inc.php
diff options
context:
space:
mode:
authornikrou <nikrou@piwigo.org>2010-06-24 20:35:46 +0000
committernikrou <nikrou@piwigo.org>2010-06-24 20:35:46 +0000
commit6394613e9f99f466fb1ba98c95286a828a3cee36 (patch)
tree55c74dc05268fe91a8fdd85f1bdba4ea329fd7a0 /include/functions_comment.inc.php
parent3a57b93baae00f91de049844232dbdbe7aead10c (diff)
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 git-svn-id: http://piwigo.org/svn/branches/2.1@6602 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'include/functions_comment.inc.php')
-rw-r--r--include/functions_comment.inc.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/functions_comment.inc.php b/include/functions_comment.inc.php
index 5468f511d..67fc40716 100644
--- a/include/functions_comment.inc.php
+++ b/include/functions_comment.inc.php
@@ -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 )
{