commit 47c28256f3729313854422849fdd9581a5af373a parent 61cef2a694108a07c0484168dc48c4f9a6836aae Author: JayVii <jayvii[AT]posteo[DOT]de> Date: Fri, 20 Dec 2024 12:10:39 +0100 fix: do not insert category placeholder directly Diffstat:
M | lib/helpers.php | | | 2 | +- |
M | lib/list.php | | | 9 | +++++++-- |
2 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/lib/helpers.php b/lib/helpers.php @@ -92,7 +92,7 @@ function gather_categories( /* initilize categories array including the "all" pseudo-category */ $categories = array( array( - "name" => $GLOBALS["i18n_list"], + "name" => "", "matches" => 0 ) ); diff --git a/lib/list.php b/lib/list.php @@ -181,8 +181,13 @@ function list_categories( } /* create button label */ - $btn_label = $category["name"] . ": " . $category["matches"] . " " . - $GLOBALS["i18n_notes"]; + if (!empty($category["name"])) { + $btn_label = $category["name"] . ": " . $category["matches"] . + " " . $GLOBALS["i18n_notes"]; + } else { + $btn_label = $GLOBALS["i18n_list"] . ": " . $category["matches"] . + " " . $GLOBALS["i18n_notes"]; + } ?>