From 51be17e4b66c7cf0be8b0ed8178446d6e0197eef Mon Sep 17 00:00:00 2001 From: NekoCH <96158157+ex-hentai@users.noreply.github.com> Date: Fri, 7 Jul 2023 16:31:38 +0800 Subject: [PATCH] insert search suggestion only when results are found (cherry picked from commit 382c779a5f9b2de74b18af8724516f79d266c3cf) --- public/torrents.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/public/torrents.php b/public/torrents.php index ee11320c5..4a621e882 100644 --- a/public/torrents.php +++ b/public/torrents.php @@ -702,7 +702,6 @@ if (isset($searchstr)) { if (!isset($_GET['notnewword']) || !$_GET['notnewword']){ - insert_suggest($searchstr, $CURUSER['id']); $notnewword=""; } else{ @@ -956,6 +955,9 @@ if ($count) { + if (isset($searchstr) && (!isset($_GET['notnewword']) || !$_GET['notnewword'])){ + insert_suggest($searchstr, $CURUSER['id']); + } if ($addparam != "") { if ($pagerlink != "")