From 3040c1d5b5905cd5c7357d291627e25f66f6d37f Mon Sep 17 00:00:00 2001 From: Shish Date: Tue, 14 Feb 2023 01:05:15 +0000 Subject: [PATCH] argh --- ext/tag_list/main.php | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/ext/tag_list/main.php b/ext/tag_list/main.php index 5564376a..c5a44e41 100644 --- a/ext/tag_list/main.php +++ b/ext/tag_list/main.php @@ -555,7 +555,7 @@ class TagList extends Extension $wild_tags = $search; - $str_search = Tag::implode($search); + $str_search = str_replace(" ", "+", Tag::implode($search)); $related_tags = $cache->get("related_tags:$str_search"); if (is_null($related_tags)) { @@ -607,13 +607,11 @@ class TagList extends Extension $args = ["limit" => $limit]; $related_tags = $database->get_all($query, $args); - $cache->set("related_tags:$str_search", $related_tags, 60 * 60); + } else { + $related_tags = []; } + $cache->set("related_tags:$str_search", $related_tags, 60 * 60); } - if ($related_tags === false) { - return []; - } else { - return $related_tags; - } + return $related_tags; } }