Skip to content

Commit

Permalink
insert search suggestion only when results are found
Browse files Browse the repository at this point in the history
(cherry picked from commit 382c779a5f9b2de74b18af8724516f79d266c3cf)
  • Loading branch information
ex-hentai committed Sep 1, 2024
1 parent 8c3b05b commit 51be17e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion public/torrents.php
Original file line number Diff line number Diff line change
Expand Up @@ -702,7 +702,6 @@
if (isset($searchstr))
{
if (!isset($_GET['notnewword']) || !$_GET['notnewword']){
insert_suggest($searchstr, $CURUSER['id']);
$notnewword="";
}
else{
Expand Down Expand Up @@ -956,6 +955,9 @@

if ($count)
{
if (isset($searchstr) && (!isset($_GET['notnewword']) || !$_GET['notnewword'])){
insert_suggest($searchstr, $CURUSER['id']);
}
if ($addparam != "")
{
if ($pagerlink != "")
Expand Down

0 comments on commit 51be17e

Please sign in to comment.