git-svn-id: http://xe-core.googlecode.com/svn/trunk@1635 201d5d3c-b55e-5fd7-737f-ddc643e51545

This commit is contained in:
zero 2007-06-17 13:03:47 +00:00
parent e9549dbd67
commit 917fef9d9f
4 changed files with 15 additions and 12 deletions

View file

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