#Add the aggregated columns...
$tags->selectAdd('max(notice_id) as last_notice_id');
if(common_config('db','type')=='pgsql') {
- $calc='sum(exp(-extract(epoch from (now()-created))/%f)) as weight';
+ $calc='sum(exp(-extract(epoch from (now()-created))/%s)) as weight';
} else {
- $calc='sum(exp(-(now() - created)/%f)) as weight';
+ $calc='sum(exp(-(now() - created)/%s)) as weight';
}
$tags->selectAdd(sprintf($calc, common_config('tag', 'dropoff')));
$tags->groupBy('tag');
function show_notices($tag) {
$cnt = 0;
+
+ $page = ($this->arg('page')) ? ($this->arg('page')+0) : 1;
+
$notice = Notice_tag::getStream($tag, (($page-1)*NOTICES_PER_PAGE), NOTICES_PER_PAGE + 1);
if ($notice) {