From 1c216e8d51ebaa3233655ad0aedbc1e1ad3e4fd6 Mon Sep 17 00:00:00 2001 From: Shish Date: Wed, 24 Jun 2020 12:41:02 +0100 Subject: [PATCH] formatting --- ext/tag_editcloud/main.php | 17 ++++++++++------- ext/user_config/theme.php | 1 - 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/ext/tag_editcloud/main.php b/ext/tag_editcloud/main.php index 068d4a3e..d8c69755 100644 --- a/ext/tag_editcloud/main.php +++ b/ext/tag_editcloud/main.php @@ -99,7 +99,7 @@ class TagEditCloud extends Extension case 'c': if (Extension::is_enabled(TagCategoriesInfo::KEY)) { $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 @@ -108,12 +108,13 @@ class TagEditCloud extends Extension ELSE 2 END, tag LIMIT :limit", - ["tag_min1" => $tags_min, "tag_min2" => $tags_min, "limit" => $max_count] + ["tag_min1" => $tags_min, "tag_min2" => $tags_min, "limit" => $max_count] ); break; } else { $sort_method = 'a'; } + // no break case 'a': case 'p': default: @@ -131,8 +132,8 @@ class TagEditCloud extends Extension } $counter = 1; - $last_cat = NULL; - $last_used_cat = NULL; + $last_cat = null; + $last_used_cat = null; foreach ($tag_data as $row) { $full_tag = $row['tag']; @@ -157,8 +158,9 @@ class TagEditCloud extends Extension if (array_search($row['tag'], $image->get_tag_array()) !== false) { if ($used_first) { - if ($last_used_cat !== $current_cat && $last_used_cat !== NULL) + if ($last_used_cat !== $current_cat && $last_used_cat !== null) { $precloud .= "\n"; + } $last_used_cat = $current_cat; $precloud .= " {$h_tag} \n"; continue; @@ -170,8 +172,9 @@ class TagEditCloud extends Extension } if ($counter++ <= $def_count) { - if ($last_cat !== $current_cat && $last_cat != NULL) - $cloud .= "\n"; //TODO: Maybe add a title for the category after the span opens? + if ($last_cat !== $current_cat && $last_cat != null) { + $cloud .= "\n"; + } //TODO: Maybe add a title for the category after the span opens? $cloud .= $entry; } else { if ($last_cat !== $current_cat && $counter !== $def_count + 2) { diff --git a/ext/user_config/theme.php b/ext/user_config/theme.php index 732a7847..46d0bd81 100644 --- a/ext/user_config/theme.php +++ b/ext/user_config/theme.php @@ -5,7 +5,6 @@ use function MicroHTML\INPUT; class UserConfigTheme extends Themelet { - public function get_user_options(string $key): string { $html = "