mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-03 16:51:40 +09:00
게시판 리스트에서 추천과 추천취소시 모듈정보를 가져오지 못하는 문제 고침
This commit is contained in:
parent
145f7e2c65
commit
8bdaad3e72
1 changed files with 28 additions and 13 deletions
|
|
@ -24,17 +24,26 @@ class documentController extends document
|
|||
*/
|
||||
function procDocumentVoteUp()
|
||||
{
|
||||
if($this->module_info->non_login_vote !== 'Y')
|
||||
$document_srl = Context::get('target_srl');
|
||||
if(!$document_srl)
|
||||
{
|
||||
throw new Rhymix\Framework\Exceptions\InvalidRequest;
|
||||
}
|
||||
|
||||
$module_info = $this->module_info;
|
||||
if(!$module_info->module_srl)
|
||||
{
|
||||
$module_info = getModel('module')->getModuleInfoByDocumentSrl($document_srl);
|
||||
}
|
||||
|
||||
if($module_info->non_login_vote !== 'Y')
|
||||
{
|
||||
if(!Context::get('is_logged'))
|
||||
{
|
||||
throw new Rhymix\Framework\Exceptions\NotPermitted;
|
||||
}
|
||||
}
|
||||
|
||||
$document_srl = Context::get('target_srl');
|
||||
if(!$document_srl) throw new Rhymix\Framework\Exceptions\InvalidRequest;
|
||||
|
||||
|
||||
$oDocumentModel = getModel('document');
|
||||
$oDocument = $oDocumentModel->getDocument($document_srl, false, false);
|
||||
$module_srl = $oDocument->get('module_srl');
|
||||
|
|
@ -56,7 +65,19 @@ class documentController extends document
|
|||
|
||||
function procDocumentVoteUpCancel()
|
||||
{
|
||||
if($this->module_info->non_login_vote !== 'Y')
|
||||
$document_srl = Context::get('target_srl');
|
||||
if(!$document_srl)
|
||||
{
|
||||
throw new Rhymix\Framework\Exceptions\InvalidRequest;
|
||||
}
|
||||
|
||||
$module_info = $this->module_info;
|
||||
if(!$module_info->module_srl)
|
||||
{
|
||||
$module_info = getModel('module')->getModuleInfoByDocumentSrl($document_srl);
|
||||
}
|
||||
|
||||
if($module_info->non_login_vote !== 'Y')
|
||||
{
|
||||
if(!Context::get('is_logged'))
|
||||
{
|
||||
|
|
@ -64,16 +85,10 @@ class documentController extends document
|
|||
}
|
||||
}
|
||||
|
||||
if($this->module_info->cancel_vote !== 'Y')
|
||||
if($module_info->cancel_vote !== 'Y')
|
||||
{
|
||||
throw new Rhymix\Framework\Exception('failed_voted_cancel');
|
||||
}
|
||||
|
||||
$document_srl = Context::get('target_srl');
|
||||
if(!$document_srl)
|
||||
{
|
||||
throw new Rhymix\Framework\Exceptions\InvalidRequest;
|
||||
}
|
||||
|
||||
$oDocumentModel = getModel('document');
|
||||
$oDocument = $oDocumentModel->getDocument($document_srl, false, false);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue