]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Sort tags by highest frequency then most recent
authorMike Cochrane <mikec@mikenz.geek.nz>
Sun, 20 Jul 2008 09:48:32 +0000 (05:48 -0400)
committerMike Cochrane <mikec@mikenz.geek.nz>
Sun, 20 Jul 2008 09:48:32 +0000 (05:48 -0400)
darcs-hash:20080720094832-533db-91b0cf2e0589ca4008b3011d5acd41449caa0904.gz

actions/tag.php

index e073a4837323b1b38f38836470ed04073d2a28b9..9e0b093243002ba86ee3aeef0239a120511c5123 100644 (file)
@@ -90,7 +90,7 @@ class TagAction extends StreamAction {
                $tags->selectAdd('count(1) as num');
                $tags->selectAdd('max(notice_id) as last_notice_id');
                $tags->groupBy('tag');
-               $tags->orderBy('num DESC');
+               $tags->orderBy('num DESC, last_notice_id DESC');
                $tags->whereAdd('created > "' . strftime('%Y-%m-%d %H:%M:%S', strtotime('-1 WEEK')) . '"');
 
                $page = ($this->arg('page')) ? ($this->arg('page')+0) : 1;