summaryrefslogtreecommitdiff
path: root/actions/favorited.php
diff options
context:
space:
mode:
authorEvan Prodromou <evan@status.net>2010-01-04 15:11:04 -1000
committerEvan Prodromou <evan@status.net>2010-01-04 15:11:04 -1000
commit31585453fc7c7ed2d4b9c72ef0478e541b5622e4 (patch)
tree04d4ba4f3c77eab0196b2fb62cd7b55959a517f0 /actions/favorited.php
parent31b62bf7817366174fcfefba585f8fa462b1b024 (diff)
parent78214c4e067616828478d600d500b34b6fcb9061 (diff)
Merge branch 'master' of git@gitorious.org:statusnet/mainline
Diffstat (limited to 'actions/favorited.php')
-rw-r--r--actions/favorited.php8
1 files changed, 2 insertions, 6 deletions
diff --git a/actions/favorited.php b/actions/favorited.php
index 150b67b0b..9ffa5b844 100644
--- a/actions/favorited.php
+++ b/actions/favorited.php
@@ -185,11 +185,7 @@ class FavoritedAction extends Action
function showContent()
{
- if (common_config('db', 'type') == 'pgsql') {
- $weightexpr='sum(exp(-extract(epoch from (now() - fave.modified)) / %s))';
- } else {
- $weightexpr='sum(exp(-(now() - fave.modified) / %s))';
- }
+ $weightexpr = common_sql_weight('fave.modified', common_config('popular', 'dropoff'));
$qry = 'SELECT notice.*, '.
$weightexpr . ' as weight ' .
@@ -207,7 +203,7 @@ class FavoritedAction extends Action
}
$notice = Memcached_DataObject::cachedQuery('Notice',
- sprintf($qry, common_config('popular', 'dropoff')),
+ $qry,
600);
$nl = new NoticeList($notice, $this);