diff --git a/ext/tag_editcloud/main.php b/ext/tag_editcloud/main.php index f9325aae..854893bc 100644 --- a/ext/tag_editcloud/main.php +++ b/ext/tag_editcloud/main.php @@ -83,18 +83,6 @@ class TagEditCloud extends Extension { } switch($sort_method) { - case 'a': - case 'p': - default: - $order_by = $sort_method == 'a' ? "tag" : "count DESC"; - $tag_data = $database->get_all(" - SELECT tag, FLOOR(LN(LN(count - :tag_min1 + 1)+1)*150)/200 AS scaled, count - FROM tags - WHERE count >= :tag_min2 - ORDER BY $order_by - LIMIT :limit", - array("tag_min1" => $tags_min, "tag_min2" => $tags_min, "limit" => $max_count)); - break; case 'r': $relevant_tags = array_diff($image->get_tag_array(),$ignore_tags); if(count($relevant_tags) == 0) { @@ -113,6 +101,18 @@ class TagEditCloud extends Extension { LIMIT :limit", array("tag_min1" => $tags_min, "tag_min2" => $tags_min, "limit" => $max_count)); break; + case 'a': + case 'p': + default: + $order_by = $sort_method == 'a' ? "tag" : "count DESC"; + $tag_data = $database->get_all(" + SELECT tag, FLOOR(LN(LN(count - :tag_min1 + 1)+1)*150)/200 AS scaled, count + FROM tags + WHERE count >= :tag_min2 + ORDER BY $order_by + LIMIT :limit", + array("tag_min1" => $tags_min, "tag_min2" => $tags_min, "limit" => $max_count)); + break; } $counter = 1;