- Timestamp:
- 08/06/08 08:20:40 (4 months ago)
- Files:
-
- devel/mod/search/lib/tags_display.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
devel/mod/search/lib/tags_display.php
r1593 r1615 9 9 $searchline = "(" . run("users:access_level_sql_where",$USER->ident) . ")"; 10 10 11 if ($tags = get_records_sql('SELECT DISTINCT tag,count(ident) AS number, '.$db->random.' AS rand 12 FROM '.$CFG->prefix."tags WHERE " . $searchline . " 13 GROUP BY tag ASC having number > 1 limit 200")) { 11 if ($tags = get_records_sql( "SELECT DISTINCT tag,count(ident) AS number FROM {$CFG->prefix}tags WHERE $searchline GROUP BY tag ASC having number > 1 ORDER BY number DESC LIMIT 200")) { 14 12 $max = 0; 15 13 foreach($tags as $tag) { … … 18 16 } 19 17 } 18 // Alpha sort the tags. This can't be done in SQL because we need to 19 // sort by relevance (tag count) there and use a LIMIT. 20 // We use keysort here because the key contains the tag. 21 uksort($tags, strcasecmp); 20 22 21 23 $tag_count = 0;
