From 917fef9d9f34c5b0dad020142bf6c2a2b7673cb4 Mon Sep 17 00:00:00 2001 From: zero Date: Sun, 17 Jun 2007 13:03:47 +0000 Subject: [PATCH] git-svn-id: http://xe-core.googlecode.com/svn/trunk@1635 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- modules/blog/blog.view.php | 13 ++++++++----- modules/board/board.view.php | 8 ++++---- modules/document/document.item.php | 4 ++-- plugins/tag_list/skins/blog_tag_list/list.html | 2 +- 4 files changed, 15 insertions(+), 12 deletions(-) diff --git a/modules/blog/blog.view.php b/modules/blog/blog.view.php index e0cc374be..41643a40b 100644 --- a/modules/blog/blog.view.php +++ b/modules/blog/blog.view.php @@ -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); diff --git a/modules/board/board.view.php b/modules/board/board.view.php index 968d99390..3e9568042 100644 --- a/modules/board/board.view.php +++ b/modules/board/board.view.php @@ -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'); } diff --git a/modules/document/document.item.php b/modules/document/document.item.php index 3b97d900c..df51b6633 100644 --- a/modules/document/document.item.php +++ b/modules/document/document.item.php @@ -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() { diff --git a/plugins/tag_list/skins/blog_tag_list/list.html b/plugins/tag_list/skins/blog_tag_list/list.html index 70d3a2c99..724739820 100644 --- a/plugins/tag_list/skins/blog_tag_list/list.html +++ b/plugins/tag_list/skins/blog_tag_list/list.html @@ -16,7 +16,7 @@