X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=actions%2Ftag.php;h=75bf6c8bfb76267ed56850926e754f689ecfd4dc;hb=3a246c17266d562e0510e5a332009dcfda43c1c7;hp=177aee603a785d3f13c154aaa61e51c99b30ccce;hpb=ddf2dce601e312fc06b38cb0dfb15857ff98ff7f;p=quix0rs-gnu-social.git diff --git a/actions/tag.php b/actions/tag.php index 177aee603a..75bf6c8bfb 100644 --- a/actions/tag.php +++ b/actions/tag.php @@ -98,9 +98,9 @@ class TagAction extends StreamAction { #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'); @@ -160,6 +160,9 @@ class TagAction extends StreamAction { 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) {