Ticket #149: tag_sort.diff
| File tag_sort.diff, 2.7 kB (added by Darth_Sebulba05@…, 3 years ago) |
|---|
-
schema.php
300 301 "rss.output.title" => array('Gregarius','Gregarius','string','Sets the title of this feedreader.',NULL), 301 302 "rss.config.ajaxparallelsize" => array('3','3','num','Sets the number of feeds to update in parallel. Remember to set rss.config.serverpush to false.',NULL), 302 303 "rss.config.ajaxbatchsize" => array('3','3','num','Sets the number of feeds in a batch when using the ajax updater. Remember to set rss.config.serverpush to false.',NULL), 303 "rss.config.defaultdashboard" => array('true','true','boolean','If the first page seen when entering the admin section should be the dashboard',NULL) 304 "rss.config.defaultdashboard" => array('true','true','boolean','If the first page seen when entering the admin section should be the dashboard',NULL), 305 "rss.output.tagsorting" => array('alphabetial,count,date,0','alphabetical,count,date,0','enum','How the tag listing should be sorted',NULL) 304 306 ); 305 307 306 308 -
cls/alltags.php
72 72 */ 73 73 function populate() { 74 74 // the all tags weighted list 75 $sql = "select t.id, t ag, count(*) as cnt from "76 .getTable('metatag') ;75 $sql = "select t.id, t.tag, count(*) as cnt from " 76 .getTable('metatag') . " m"; 77 77 if($this -> type == 'channel'){ 78 $sql .= " left join " . getTable('channels') . " c on ( fid=c.id),"79 .getTable('tag')." t "." where tid=t.id "80 . " and ttype = 'channel'";78 $sql .= " left join " . getTable('channels') . " c on (m.fid=c.id)," 79 .getTable('tag')." t "." where m.tid=t.id " 80 . " and m.ttype = 'channel'"; 81 81 }else{ 82 $sql .= " left join ".getTable('item')." i on ( fid=i.id),"83 .getTable('tag')." t "." where tid=t.id "84 ." and ttype = 'item'";82 $sql .= " left join ".getTable('item')." i on (m.fid=i.id)," 83 .getTable('tag')." t "." where m.tid=t.id " 84 ." and m.ttype = 'item'"; 85 85 } 86 86 87 88 87 // Don't count tags of private items 89 88 if (hidePrivate()) { 90 89 $sql .= " and not(i.unread & ".FEED_MODE_PRIVATE_STATE.") "; 91 90 } 92 91 93 $sql .= "group by tid order by tag";92 $sql .= "group by m.tid"; 94 93 94 switch(getConfig("rss.output.tagsorting")) { 95 case "date" : $sql .= " order by m.tdate, t.tag"; 96 break; 97 case "count" : $sql .= " order by cnt, t.tag"; 98 break; 99 case "alphabetical" : $sql .= " order by t.tag"; 100 default : 101 break; 102 } 95 103 96 104 $res = rss_query($sql); 97 105 $max = 0;
