From c440bd9e1b98198b8fa450aa3c4dc6c2b4da2ee6 Mon Sep 17 00:00:00 2001 From: pbootcms Date: Sat, 27 Jun 2026 17:37:22 +0800 Subject: [PATCH] =?UTF-8?q?fix=20#23=20=E4=BF=AE=E5=A4=8D=E6=A0=87?= =?UTF-8?q?=E7=AD=BE=E9=A1=B5=E6=A8=A1=E6=9D=BF=E6=B3=A8=E5=85=A5=E9=A3=8E?= =?UTF-8?q?=E9=99=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/home/controller/TagController.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/apps/home/controller/TagController.php b/apps/home/controller/TagController.php index 84db4df..4bd2c0c 100644 --- a/apps/home/controller/TagController.php +++ b/apps/home/controller/TagController.php @@ -29,10 +29,11 @@ public function index() { // 在非兼容模式接受地址第二参数值 if (defined('RVAR')) { - $_GET['tag'] = RVAR; + $_GET['tag'] = constant('\RVAR'); } - if (! get('tag')) { + $tag = get('tag', 'vars'); + if (! $tag) { _404('您访问的页面不存在,请核对后重试!'); } @@ -42,9 +43,9 @@ public function index() } $content = parent::parser($this->htmldir . $tagstpl); // 框架标签解析 $content = $this->parser->parserBefore($content); // CMS公共标签前置解析 - $content = $this->parser->parserPositionLabel($content, 0, '相关内容', Url::home('tag/' . get('tag'))); // CMS当前位置标签解析 - $content = $this->parser->parserSpecialPageSortLabel($content, - 2, '相关内容', Url::home('tag/' . get('tag'))); // 解析分类标签 + $content = $this->parser->parserPositionLabel($content, 0, '相关内容', Url::home('tag/' . $tag)); // CMS当前位置标签解析 + $content = $this->parser->parserSpecialPageSortLabel($content, - 2, '相关内容', Url::home('tag/' . $tag)); // 解析分类标签 $content = $this->parser->parserAfter($content); // CMS公共标签后置解析 $this->cache($content, true); } -} \ No newline at end of file +}