X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Ffavorited.php;h=d8980440d17529a73db33990f72fed90f740b247;hb=82cac2be595953029e61f2e6f21122206b82314e;hp=9ffa5b84454093fde32b98460751b60bbab32745;hpb=af95005bc481d6f8f84a780bdc062426e22f3a03;p=quix0rs-gnu-social.git diff --git a/actions/favorited.php b/actions/favorited.php index 9ffa5b8445..d8980440d1 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';