From fbc4db545c305c964adb3ae6ccd0155e88bcf63c Mon Sep 17 00:00:00 2001 From: lanzongjun Date: Wed, 6 Jul 2022 11:07:39 +0800 Subject: [PATCH] * fix bug #24806 --- module/search/control.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/module/search/control.php b/module/search/control.php index 22e5935e0e..942094faa1 100644 --- a/module/search/control.php +++ b/module/search/control.php @@ -149,12 +149,12 @@ class search extends control $query = $queryID ? $queryID : ''; $module = empty($module) ? $this->session->searchParams['module'] : $module; $queries = $this->search->getQueryPairs($module); - $html = ''; foreach($queries as $queryID => $queryName) { if(empty($queryID)) continue; - $html .= '
  • ' . html::a("javascript:executeQuery({$queryID})", $queryName . (common::hasPriv('search', 'deleteQuery') ? '' : ''), '', "class='label user-query' data-query-id='$queryID'") . '
  • '; + $query = $this->search->getByID($queryID); + $html .= '
  • ' . html::a("javascript:executeQuery({$queryID})", $queryName . ((common::hasPriv('search', 'deleteQuery') and $this->app->user->account == $query->account) ? '' : ''), '', "class='label user-query' data-query-id='$queryID' title='{$queryName}'") . '
  • '; } echo $html; }