insert search suggestion only when results are found

(cherry picked from commit 382c779a5f9b2de74b18af8724516f79d266c3cf)
This commit is contained in:
NekoCH
2023-07-07 16:31:38 +08:00
parent 8c3b05bf4d
commit 51be17e4b6
+3 -1
View File
@@ -702,7 +702,6 @@ $search_area = 0;
if (isset($searchstr))
{
if (!isset($_GET['notnewword']) || !$_GET['notnewword']){
insert_suggest($searchstr, $CURUSER['id']);
$notnewword="";
}
else{
@@ -956,6 +955,9 @@ do_log("[TORRENT_COUNT_SQL] $sql", 'debug');
if ($count)
{
if (isset($searchstr) && (!isset($_GET['notnewword']) || !$_GET['notnewword'])){
insert_suggest($searchstr, $CURUSER['id']);
}
if ($addparam != "")
{
if ($pagerlink != "")