From d9dbe718bdfb7a833d25a4e3bd0101a40b0d9638 Mon Sep 17 00:00:00 2001 From: johnnyq Date: Wed, 16 Aug 2023 14:37:35 -0400 Subject: [PATCH] Allow the reuse of colors in tags --- settings_tag_add_modal.php | 2 +- settings_tag_edit_modal.php | 2 +- settings_tags.php | 22 +--------------------- 3 files changed, 3 insertions(+), 23 deletions(-) diff --git a/settings_tag_add_modal.php b/settings_tag_add_modal.php index fa40bd0e..d2073068 100644 --- a/settings_tag_add_modal.php +++ b/settings_tag_add_modal.php @@ -34,7 +34,7 @@ diff --git a/settings_tag_edit_modal.php b/settings_tag_edit_modal.php index 1b94b03d..001d715b 100644 --- a/settings_tag_edit_modal.php +++ b/settings_tag_edit_modal.php @@ -42,7 +42,7 @@
diff --git a/settings_tags.php b/settings_tags.php index a0ca3d51..bb3570e0 100644 --- a/settings_tags.php +++ b/settings_tags.php @@ -18,28 +18,8 @@ $sql = mysqli_query( $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()")); -$colors_used_array = []; - -if ($num_rows > 0) { - //Colors Used - $sql_colors_used = mysqli_query( - $mysqli, - "SELECT tag_color FROM tags - WHERE tag_archived_at IS NULL" - ); - - while ($color_used_row = mysqli_fetch_array($sql_colors_used)) { - $colors_used_array[] = $color_used_row['tag_color']; - } - $colors_diff = array_diff($colors_array, $colors_used_array); - -} else { - $colors_diff = $colors_array; -} - ?> -

Tags

@@ -81,7 +61,7 @@ if ($num_rows > 0) { while ($row = mysqli_fetch_array($sql)) { $tag_id = intval($row['tag_id']); $tag_name = nullable_htmlentities($row['tag_name']); - $tag_type = nullable_htmlentities($row['tag_type']); + $tag_type = intval($row['tag_type']); $tag_color = nullable_htmlentities($row['tag_color']); $tag_icon = nullable_htmlentities($row['tag_icon']);