diff options
author | Evan Prodromou <evan@status.net> | 2010-01-04 10:55:21 -1000 |
---|---|---|
committer | Evan Prodromou <evan@status.net> | 2010-01-04 10:55:21 -1000 |
commit | 6add2693b009a2122883f4f6c96c775be878e42c (patch) | |
tree | ea6f11e37e44f61216cf9d3f678d2d99a72fc30c /actions/favorited.php | |
parent | 96480aa6c1abda95db272f7c0a2b0e96f17acc70 (diff) | |
parent | f5b8177bc752c29228ee76bc95285cdbb8549748 (diff) |
Merge branch '0.9.x' of git@gitorious.org:statusnet/mainline into 0.9.x
Diffstat (limited to 'actions/favorited.php')
-rw-r--r-- | actions/favorited.php | 8 |
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); |