From 2ec9bafb4eb5f624bca3a729a82bd883a70cf34c Mon Sep 17 00:00:00 2001 From: ZhaiSoul <842607283@qq.com> Date: Sun, 7 Jun 2020 02:41:56 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20=E5=9B=A0=E7=BC=93?= =?UTF-8?q?=E5=AD=98=E9=94=AE=E5=80=BC=E7=9B=B8=E5=90=8C=E5=AF=BC=E8=87=B4?= =?UTF-8?q?=E7=9A=84=E5=BC=80=E5=90=AF=E7=89=88=E5=9D=97=E7=BC=93=E5=AD=98?= =?UTF-8?q?=E5=90=8E=E7=89=88=E5=9D=97=E8=A7=84=E5=88=99=E5=A4=B1=E6=95=88?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- upload/source/class/table/table_forum_forum.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/upload/source/class/table/table_forum_forum.php b/upload/source/class/table/table_forum_forum.php index 113050e3c..b79c62dab 100644 --- a/upload/source/class/table/table_forum_forum.php +++ b/upload/source/class/table/table_forum_forum.php @@ -38,10 +38,10 @@ class table_forum_forum extends discuz_table return DB::fetch_all("SELECT * FROM ".DB::table($this->_table)." WHERE $typesql $statussql $fupsql $limitsql"); } public function fetch_info_by_fid($fid) { - $data = $this->fetch_cache($fid); - if($data === false || !array_key_exists('description', $data)) { + $cache_name = $fid . "_with_fields"; + if(($data = $this->fetch_cache($cache_name)) === false) { $data = DB::fetch_first("SELECT ff.*, f.* FROM %t f LEFT JOIN %t ff ON ff.fid=f.fid WHERE f.fid=%d", array($this->_table, 'forum_forumfield', $fid)); - $this->store_cache($fid, $data); + $this->store_cache($cache_name, $data); } return $data; } -- Gitee