mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-22 20:02:15 +09:00
게시글 삭제시 댓글 삭제 트리거에서 권한없음 오류를 return하는 문제 해결
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@3522 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
f9557205a6
commit
01036595b8
2 changed files with 8 additions and 4 deletions
|
|
@ -338,7 +338,8 @@
|
|||
$oDocumentModel = &getModel('document');
|
||||
|
||||
// 권한이 있는지 확인
|
||||
if(!$oDocumentModel->isGranted($document_srl)) return new Object(-1, 'msg_not_permitted');
|
||||
$oDocument = $oDocumentModel->getDocument($document_srl);
|
||||
if(!$oDocument->isExists() || !$oDocument->isGranted()) return new Object(-1, 'msg_not_permitted');
|
||||
|
||||
// 삭제
|
||||
$args->document_srl = $document_srl;
|
||||
|
|
|
|||
|
|
@ -24,10 +24,13 @@
|
|||
* @brief 문서 가져오기
|
||||
**/
|
||||
function getDocument($document_srl=0, $is_admin = false) {
|
||||
$oDocument = new documentItem($document_srl);
|
||||
if($is_admin) $oDocument->setGrant();
|
||||
if(!$GLOBALS['__DocumentItem__'][$document_srl]) {
|
||||
$oDocument = new documentItem($document_srl);
|
||||
if($is_admin) $oDocument->setGrant();
|
||||
$GLOBALS['__DocumentItem__'][$document_srl] = $oDocument;
|
||||
}
|
||||
|
||||
return $oDocument;
|
||||
return $GLOBALS['__DocumentItem__'][$document_srl];
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue