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() { 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'); $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); Context::set('oDocument',$oDocument);

View file

@ -174,16 +174,16 @@
// 지정된 글이 있는지 확인 // 지정된 글이 있는지 확인
if($document_srl) { if($document_srl) {
$oDocumentModel = &getModel('document'); $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'); $this->setTemplateFile('delete_form');
} }

View file

@ -68,11 +68,11 @@
} }
function allowComment() { function allowComment() {
return $this->get('allow_comment') == 'Y' ? true : false; return $this->get('allow_comment') == 'Y' || !$this->isExists() ? true : false;
} }
function allowTrackback() { function allowTrackback() {
return $this->get('allow_trackback') == 'Y' ? true : false; return $this->get('allow_trackback') == 'Y' || !$this->isExists() ? true : false;
} }
function isLocked() { function isLocked() {

View file

@ -16,7 +16,7 @@
<div class="tag_box"> <div class="tag_box">
<!--@foreach($plugin_info->tag_list as $val)--> <!--@foreach($plugin_info->tag_list as $val)-->
<div class="tag"> <div class="tag">
<a href="{getUrl('mid',$mid,'search_target','tag','search_keyword',urlencode($val->tag))}">{cut_str($val->tag,15,'...')}</a> <a href="{getUrl('','mid',$mid,'search_target','tag','search_keyword',urlencode($val->tag))}">{cut_str($val->tag,15,'...')}</a>
</div> </div>
<!--@end--> <!--@end-->
</div> </div>