summaryrefslogtreecommitdiff
path: root/classes/Notice.php
diff options
context:
space:
mode:
authorEvan Prodromou <evan@controlyourself.ca>2009-03-11 22:43:55 -0400
committerEvan Prodromou <evan@controlyourself.ca>2009-03-11 22:43:55 -0400
commit4a41dbcdc4ba61b8aa59f4d3cba545652e5706e1 (patch)
tree231b0ec660ca779df89263dfd6bc3833064e454d /classes/Notice.php
parent254e5e502017dad767a6b57aa2c5c9422d6e02e5 (diff)
parent2fa6d429776f60925717a7c18330c3df0cd9d124 (diff)
Merge branch '0.7.x' of git@gitorious.org:laconica/dev into 0.7.x
Diffstat (limited to 'classes/Notice.php')
-rw-r--r--classes/Notice.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/classes/Notice.php b/classes/Notice.php
index 1e3b330f2..3087e39a7 100644
--- a/classes/Notice.php
+++ b/classes/Notice.php
@@ -232,7 +232,11 @@ class Notice extends Memcached_DataObject
$notice = new Notice();
$notice->profile_id = $profile_id;
$notice->content = $content;
- $notice->whereAdd('now() - created < ' . common_config('site', 'dupelimit'));
+ if (common_config('db','type') == 'pgsql')
+ $notice->whereAdd('extract(epoch from now() - created) < ' . common_config('site', 'dupelimit'));
+ else
+ $notice->whereAdd('now() - created < ' . common_config('site', 'dupelimit'));
+
$cnt = $notice->count();
return ($cnt == 0);
}