From 5adbde3e9c6d613bbce0ffb0588a57d0bc125b4e Mon Sep 17 00:00:00 2001
From: tianya <yanghuxiao@vip.qq.com>
Date: Mon, 31 Mar 2025 23:23:23 +0800
Subject: [PATCH] Update searchview.class.php

---
 src/system/archive/searchview.class.php | 20 +++++---------------
 1 file changed, 5 insertions(+), 15 deletions(-)

diff --git a/src/system/archive/searchview.class.php b/src/system/archive/searchview.class.php
index c5be9937..f24c9014 100755
--- a/src/system/archive/searchview.class.php
+++ b/src/system/archive/searchview.class.php
@@ -42,6 +42,7 @@ class SearchView
     var $mid;
     var $KType;
     var $Keyword;
+    var $SearchKeyword;
     var $SearchMax;
     var $SearchMaxRc;
     var $SearchTime;
@@ -98,6 +99,7 @@ class SearchView
         $this->dtp2->SetNameSpace("field", "[", "]");
         $this->TypeLink = new TypeLink($typeid);
         //通过分词获取关键词
+        $this->SearchKeyword = $keyword;
         $this->Keywords = $this->GetKeywords($keyword);
         //设置一些全局参数的值
         if ($this->TypeID == "0") {
@@ -298,26 +300,14 @@ class SearchView
      */
     function GetRedKeyWord($fstr)
     {
-        $ks = explode(' ', $this->Keywords);
-        foreach ($ks as $k) {
-            $k = trim($k);
-            if ($k == '') {
-                continue;
-            }
-            if (ord($k[0]) > 0x80 && strlen($k) < 2) {
-                continue;
-            }
-            //不区分大小$fstr = str_ireplace($k, "<strong style='color:red'>$k</strong>", $fstr);
-            //速度效率更快
-            $fstr = str_replace($k, "<strong style='color:red'>$k</strong>", $fstr);
-        }
-        return $fstr;
+        $k = trim($this->SearchKeyword);
+        return ($k == '')?  $fstr : str_replace($k, "<strong style='color:red'>$k</strong>", $fstr);
     }
     /**
      *  统计列表里的记录
      *
      * @access    public
-     * @return    string
+     * @return    void
      */
     function CountRecord()
     {