블로그/게시판등 모듈에 상관없이 문서의 출력을 위한 권한을 처리하기 위해 document.item.php의 isAccessible()추가 및 레이아웃 처리를 Context를 이용하여 보이지 않도록 수정

git-svn-id: http://xe-core.googlecode.com/svn/trunk@1913 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
zero 2007-07-12 09:50:50 +00:00
parent d0c8f54ed8
commit f4f44da48d
6 changed files with 39 additions and 18 deletions

View file

@ -67,6 +67,10 @@
$_SESSION['own_document'][$this->document_srl] = true;
}
function isAccessible() {
return $_SESSION['accessible'][$this->document_srl]==true?true:false;
}
function allowComment() {
return $this->get('allow_comment') == 'Y' || !$this->isExists() ? true : false;
}
@ -119,12 +123,14 @@
function getContentText() {
if($this->isSecret() && !$this->isGranted()) return Context::getLang('msg_is_secret');
$_SESSION['accessible'][$this->document_srl] = true;
return htmlspecialchars($this->get('content'));
}
function getContent() {
if($this->isSecret() && !$this->isGranted()) return Context::getLang('msg_is_secret');
$_SESSION['accessible'][$this->document_srl] = true;
return sprintf('<!--BeforeDocument(%d,%d)-->%s<!--AfterDocument(%d,%d)-->', $this->document_srl, $this->get('member_srl'), $this->get('content'), $this->document_srl, $this->get('member_srl'));
}