From ecec361766a5b1fe63b030b6c8cc7f6fa15ca26b Mon Sep 17 00:00:00 2001 From: Min-Soo Kim Date: Thu, 17 Nov 2022 19:40:12 +0900 Subject: [PATCH] =?UTF-8?q?=ED=8E=98=EC=9D=B4=EC=A7=80=20=EB=AA=A8?= =?UTF-8?q?=EB=93=88=EC=9D=98=20=EC=A3=BC=EC=86=8C=20=EC=A4=91=20=EB=AC=B8?= =?UTF-8?q?=EC=84=9C=20=EB=B2=88=ED=98=B8=EA=B0=80=20=EB=93=A4=EC=96=B4?= =?UTF-8?q?=EA=B0=84=20=EA=B2=BD=EC=9A=B0=20=EC=A0=81=EC=A0=88=ED=9E=88=20?= =?UTF-8?q?=EC=B2=98=EB=A6=AC=EB=90=98=EB=8F=84=EB=A1=9D=20=EC=88=98?= =?UTF-8?q?=EC=A0=95=20(#2019)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit https://github.com/rhymix/rhymix/issues/1983 관련 - 라이믹스의 짧은 주소 기능을 활용하는 경우, 숫자로 입력된 주소가 `act`로 인식되는 문제 수정 (짧은 주소 규칙을 모듈 xml에 정의) - `article` 타입의 페이지인 경우, 문서 번호를 무시하도록 수정 - Page type이 article이 아니라면, 기존 주소 유지 - https://github.com/rhymix/rhymix/pull/2019#discussion_r1019876776 내용을 반영하여서 수정 - document srl을 일괄 삭제하면, 필요한 위젯이나 outside 페이지에서는 문제가 생길 수 있기 때문에 이를 반영함. - `article` type의 페이지는 page 모듈에서 모든 권한을 가지고 통제할 수 있기 때문에 이 페이지의 경우는 `document_srl`으로 접속하는 경우 `mid`만을 남기고 주소에서 삭제 --- modules/page/conf/module.xml | 4 +++- modules/page/page.view.php | 14 ++++++++++++-- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/modules/page/conf/module.xml b/modules/page/conf/module.xml index fa909551e..2e491a9bf 100644 --- a/modules/page/conf/module.xml +++ b/modules/page/conf/module.xml @@ -7,7 +7,9 @@ - + + + diff --git a/modules/page/page.view.php b/modules/page/page.view.php index dd2db8a96..4bbf09656 100644 --- a/modules/page/page.view.php +++ b/modules/page/page.view.php @@ -80,8 +80,18 @@ class pageView extends page Context::set('module_info', $this->module_info); Context::set('page_content', $page_content); - $this->setTemplatePath($this->module_path . 'tpl'); - $this->setTemplateFile($this instanceof pageMobile ? 'mobile' : 'content'); + // if the page type is the widget or outside, there might be usable GET entities. + $request_vars = Context::getRequestVars(); + if (isset($request_vars->document_srl) && intval($request_vars->document_srl) > 0 && $page_type_name == 'article') + { + $returnUrl = getUrl(['mid' => Context::get('mid')]); + $this->setRedirectUrl($returnUrl); + } + else + { + $this->setTemplatePath($this->module_path . 'tpl'); + $this->setTemplateFile($this instanceof pageMobile ? 'mobile' : 'content'); + } } function _getWidgetContent()