From 37c5e8ca3c2d77fc3e1836fd76d7462e33f1668e Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Mon, 11 Aug 2008 13:58:20 -0400 Subject: make tag dropoff configurable darcs-hash:20080811175820-84dde-f3d934495fa90fadde5f7d5d0c37c5f2a575a9d8.gz --- actions/tag.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'actions') diff --git a/actions/tag.php b/actions/tag.php index 3f379ffdf..1042513d5 100644 --- a/actions/tag.php +++ b/actions/tag.php @@ -21,7 +21,6 @@ if (!defined('LACONICA')) { exit(1); } require_once(INSTALLDIR.'/actions/showstream.php'); define('TAGS_PER_PAGE', 100); -define('AGE_FACTOR', 864000.0); class TagAction extends StreamAction { @@ -90,7 +89,7 @@ class TagAction extends StreamAction { # This should probably be cached rather than recalculated $tags = DB_DataObject::factory('Notice_tag'); $tags->selectAdd('max(notice_id) as last_notice_id'); - $tags->selectAdd(sprintf('sum(exp(-(now() - created)/%f)) as weight', AGE_FACTOR)); + $tags->selectAdd(sprintf('sum(exp(-(now() - created)/%f)) as weight', common_config('tag', 'dropoff'))); $tags->groupBy('tag'); $tags->orderBy('weight DESC'); -- cgit v1.2.3-54-g00ecf