From Scrutinizer: The case 'r' would never be reached due to the default appearing before it.
This commit is contained in:
parent
d62304cf70
commit
9e7787de0c
1 changed files with 12 additions and 12 deletions
|
@ -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;
|
||||
|
|
Reference in a new issue