mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-13 16:34:52 +09:00
git-svn-id: http://xe-core.googlecode.com/svn/trunk@1635 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
e9549dbd67
commit
917fef9d9f
4 changed files with 15 additions and 12 deletions
|
|
@ -206,19 +206,22 @@
|
|||
**/
|
||||
function dispBlogDelete() {
|
||||
// 권한 체크
|
||||
if(!$this->grant->write_document) return $this->dispBlogMessage('msg_not_permitted');
|
||||
if(!$this->grant->write_document) return $this->dispBoardMessage('msg_not_permitted');
|
||||
|
||||
// 삭제할 문서번호를 가져온다
|
||||
$document_srl = Context::get('document_srl');
|
||||
|
||||
$oDocumentModel = &getModel('document');
|
||||
$oDocument = $oDocumentModel->getDocument($document_srl, $this->grant->manager);
|
||||
// 지정된 글이 있는지 확인
|
||||
if($document_srl) {
|
||||
$oDocumentModel = &getModel('document');
|
||||
$oDocument = $oDocumentModel->getDocument($document_srl);
|
||||
}
|
||||
|
||||
// 삭제하려는 글이 없으면 에러
|
||||
if(!$oDocument->isExists()) return $this->dispBlogContent();
|
||||
if(!$oDocument->isExists()) return $this->dispBoardContent();
|
||||
|
||||
// 권한이 없는 경우 비밀번호 입력화면으로
|
||||
if($oDocument->isExists()&&!$oDocument->isGranted()) return $this->setTemplateFile('input_password_form');
|
||||
if(!$oDocument->isGranted()) return $this->setTemplateFile('input_password_form');
|
||||
|
||||
Context::set('oDocument',$oDocument);
|
||||
|
||||
|
|
|
|||
|
|
@ -174,16 +174,16 @@
|
|||
// 지정된 글이 있는지 확인
|
||||
if($document_srl) {
|
||||
$oDocumentModel = &getModel('document');
|
||||
$document = $oDocumentModel->getDocument($document_srl);
|
||||
$oDocument = $oDocumentModel->getDocument($document_srl);
|
||||
}
|
||||
|
||||
// 삭제하려는 글이 없으면 에러
|
||||
if(!$document) return $this->dispBoardContent();
|
||||
if(!$oDocument->isExists()) return $this->dispBoardContent();
|
||||
|
||||
// 권한이 없는 경우 비밀번호 입력화면으로
|
||||
if($document&&!$document->is_granted) return $this->setTemplateFile('input_password_form');
|
||||
if(!$oDocument->isGranted()) return $this->setTemplateFile('input_password_form');
|
||||
|
||||
Context::set('document',$document);
|
||||
Context::set('oDocument',$oDocument);
|
||||
|
||||
$this->setTemplateFile('delete_form');
|
||||
}
|
||||
|
|
|
|||
|
|
@ -68,11 +68,11 @@
|
|||
}
|
||||
|
||||
function allowComment() {
|
||||
return $this->get('allow_comment') == 'Y' ? true : false;
|
||||
return $this->get('allow_comment') == 'Y' || !$this->isExists() ? true : false;
|
||||
}
|
||||
|
||||
function allowTrackback() {
|
||||
return $this->get('allow_trackback') == 'Y' ? true : false;
|
||||
return $this->get('allow_trackback') == 'Y' || !$this->isExists() ? true : false;
|
||||
}
|
||||
|
||||
function isLocked() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue