summaryrefslogtreecommitdiff
path: root/actions
diff options
context:
space:
mode:
authorBrion Vibber <brion@pobox.com>2010-02-04 12:23:56 -0800
committerBrion Vibber <brion@pobox.com>2010-02-04 12:23:56 -0800
commitc59eee72a8453cc43f169c62d1afb214c0c539bc (patch)
treed7fa62b31c708e9cda1dd52b032971e5f19ebdd4 /actions
parente89107549475ee1e824bcf6f0bd66830fb724b2f (diff)
parenta020e230860358fc8b63cd56872bbad0446016e0 (diff)
Merge branch 'testing' of gitorious.org:statusnet/mainline into 0.9.x
Diffstat (limited to 'actions')
-rw-r--r--actions/favorited.php3
-rw-r--r--actions/publictagcloud.php3
2 files changed, 6 insertions, 0 deletions
diff --git a/actions/favorited.php b/actions/favorited.php
index 9ffa5b844..d8980440d 100644
--- a/actions/favorited.php
+++ b/actions/favorited.php
@@ -186,10 +186,13 @@ class FavoritedAction extends Action
function showContent()
{
$weightexpr = common_sql_weight('fave.modified', common_config('popular', 'dropoff'));
+ $cutoff = sprintf("fave.modified > '%s'",
+ common_sql_date(time() - common_config('popular', 'cutoff')));
$qry = 'SELECT notice.*, '.
$weightexpr . ' as weight ' .
'FROM notice JOIN fave ON notice.id = fave.notice_id ' .
+ "WHERE $cutoff " .
'GROUP BY id,profile_id,uri,content,rendered,url,created,notice.modified,reply_to,is_local,source,notice.conversation ' .
'ORDER BY weight DESC';
diff --git a/actions/publictagcloud.php b/actions/publictagcloud.php
index 9e4478dbb..9993b2d3f 100644
--- a/actions/publictagcloud.php
+++ b/actions/publictagcloud.php
@@ -106,7 +106,10 @@ class PublictagcloudAction extends Action
#Add the aggregated columns...
$tags->selectAdd('max(notice_id) as last_notice_id');
$calc = common_sql_weight('created', common_config('tag', 'dropoff'));
+ $cutoff = sprintf("notice_tag.created > '%s'",
+ common_sql_date(time() - common_config('tag', 'cutoff')));
$tags->selectAdd($calc . ' as weight');
+ $tags->addWhere($cutoff);
$tags->groupBy('tag');
$tags->orderBy('weight DESC');