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
@ -83,18 +83,6 @@ class TagEditCloud extends Extension {
|
|||||||
}
|
}
|
||||||
|
|
||||||
switch($sort_method) {
|
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':
|
case 'r':
|
||||||
$relevant_tags = array_diff($image->get_tag_array(),$ignore_tags);
|
$relevant_tags = array_diff($image->get_tag_array(),$ignore_tags);
|
||||||
if(count($relevant_tags) == 0) {
|
if(count($relevant_tags) == 0) {
|
||||||
@ -113,6 +101,18 @@ class TagEditCloud extends Extension {
|
|||||||
LIMIT :limit",
|
LIMIT :limit",
|
||||||
array("tag_min1" => $tags_min, "tag_min2" => $tags_min, "limit" => $max_count));
|
array("tag_min1" => $tags_min, "tag_min2" => $tags_min, "limit" => $max_count));
|
||||||
break;
|
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;
|
$counter = 1;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user