페이지 모듈의 주소 중 문서 번호가 들어간 경우 적절히 처리되도록 수정 (#2019)

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`만을 남기고 주소에서 삭제
This commit is contained in:
Min-Soo Kim 2022-11-17 19:40:12 +09:00 committed by GitHub
parent 5547c82619
commit ecec361766
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 3 deletions

View file

@ -7,7 +7,9 @@
</grant>
</grants>
<actions>
<action name="dispPageIndex" type="view" standalone="false" index="true" />
<action name="dispPageIndex" type="view" standalone="false" index="true">
<route route="$document_srl:int" priority="100" />
</action>
<action name="dispPageAdminContent" type="view" admin_index="true" menu_name="page" menu_index="true" />
<action name="dispPageAdminDelete" type="view" menu_name="page" />

View file

@ -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()