mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-04 01:01:41 +09:00
Allow dispBoardCategory() and dispBoardCommentPage() to be used in PC
모바일에서만 사용할 수 있었던 dispBoardCategory() 액션을 PC에서도 사용할 수 있도록 변경함. (PC용 스킨에서 category.html 템플릿을 제공하는 경우에 한함) 모바일에서만 사용할 수 있었던 getBoardCommentPage() 액션의 이름을 dispBoardCommentPage()로 바꾸어 PC에서도 사용할 수 있도록 변경하고 기존의 모바일 getBoardCommentPage() 액션은 dispBoardCommentPage()로 연결함. (get으로 시작하는 액션명은 원래 model에서 써야 하는데 잘못 지정됨) 누가 모바일 스킨을 만들다가 필요해서 추가한 액션인 것 같은데 왜 PC에서는 사용할 수 없도록 해놓았는지 의문임. 비슷한 기능을 PC에서 사용하기 위해 getBoardCommentPageForPC() 등의 액션을 임의로 추가하여 사용하는 사이트가 은근히 많이 보임.
This commit is contained in:
parent
9ba0b1e3e6
commit
94cdcb2e7c
3 changed files with 41 additions and 32 deletions
|
|
@ -87,36 +87,9 @@ class boardMobile extends boardView
|
|||
Context::addJsFilter($this->module_path.'tpl/filter', 'input_password.xml');
|
||||
}
|
||||
|
||||
function dispBoardCategory()
|
||||
{
|
||||
$this->dispBoardCategoryList();
|
||||
$category_list = Context::get('category_list');
|
||||
$this->setTemplateFile('category.html');
|
||||
}
|
||||
|
||||
function getBoardCommentPage()
|
||||
{
|
||||
$document_srl = Context::get('document_srl');
|
||||
$oDocumentModel =& getModel('document');
|
||||
if(!$document_srl)
|
||||
{
|
||||
return new Object(-1, "msg_invalid_request");
|
||||
}
|
||||
|
||||
if($this->grant->view == false || ($this->module_info->consultation == 'Y' && !$this->grant->manager && !$this->grant->consultation_read))
|
||||
{
|
||||
return new Object(-1, "msg_not_permitted");
|
||||
}
|
||||
|
||||
$oDocument = $oDocumentModel->getDocument($document_srl);
|
||||
if(!$oDocument->isExists())
|
||||
{
|
||||
return new Object(-1, "msg_invalid_request");
|
||||
}
|
||||
Context::set('oDocument', $oDocument);
|
||||
$oTemplate = TemplateHandler::getInstance();
|
||||
$html = $oTemplate->compile($this->getTemplatePath(), "comment.html");
|
||||
$this->add("html", $html);
|
||||
{
|
||||
$this->dispBoardCommentPage();
|
||||
}
|
||||
|
||||
function dispBoardMessage($msg_code)
|
||||
|
|
|
|||
|
|
@ -351,8 +351,6 @@ class boardView extends board
|
|||
* add javascript filters
|
||||
**/
|
||||
Context::addJsFilter($this->module_path.'tpl/filter', 'insert_comment.xml');
|
||||
|
||||
// return new Object();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -642,6 +640,43 @@ class boardView extends board
|
|||
$this->setTemplateFile('tag_list');
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief display category list
|
||||
*/
|
||||
function dispBoardCategory()
|
||||
{
|
||||
$this->dispBoardCategoryList();
|
||||
$this->setTemplateFile('category.html');
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief display comment page
|
||||
*/
|
||||
function dispBoardCommentPage()
|
||||
{
|
||||
$document_srl = Context::get('document_srl');
|
||||
if(!$document_srl)
|
||||
{
|
||||
return new Object(-1, "msg_invalid_request");
|
||||
}
|
||||
|
||||
if($this->grant->view == false || ($this->module_info->consultation == 'Y' && !$this->grant->manager && !$this->grant->consultation_read))
|
||||
{
|
||||
return new Object(-1, "msg_not_permitted");
|
||||
}
|
||||
|
||||
$oDocument = getModel('document')->getDocument($document_srl);
|
||||
if(!$oDocument->isExists())
|
||||
{
|
||||
return new Object(-1, "msg_invalid_request");
|
||||
}
|
||||
Context::set('oDocument', $oDocument);
|
||||
|
||||
$oTemplate = TemplateHandler::getInstance();
|
||||
$html = $oTemplate->compile($this->getTemplatePath(), 'comment.html');
|
||||
$this->add('html', $html);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief display document write form
|
||||
**/
|
||||
|
|
|
|||
|
|
@ -75,7 +75,8 @@
|
|||
<action name="dispBoardContentCommentList" type="view" permission="view" standalone="false" />
|
||||
<action name="dispBoardContentFileList" type="view" permission="view" standalone="false" />
|
||||
<action name="dispBoardTagList" type="view" permission="list" standalone="false" />
|
||||
<action name="dispBoardCategory" type="mobile" permission="list" standalone="false" />
|
||||
<action name="dispBoardCategory" type="view" permission="list" standalone="false" />
|
||||
<action name="dispBoardCommentPage" type="view" permission="view" standalone="false" />
|
||||
<action name="getBoardCommentPage" type="mobile" permission="view" standalone="false" />
|
||||
|
||||
<action name="procBoardInsertDocument" type="controller" permission="write_document" standalone="false" ruleset="insertDocument" />
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue