#249 비밀댓글에 댓글을 달 경우 권한이 이양되도록 하여 비밀댓글로 서로 이야기가 가능하도록 추가 수정

git-svn-id: http://xe-core.googlecode.com/svn/sandbox@3664 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
zero 2008-02-14 07:52:58 +00:00
parent 2d9042dc34
commit cacb75738d
2 changed files with 20 additions and 5 deletions

View file

@ -63,6 +63,10 @@
$this->is_granted = true;
}
function setAccessible() {
$_SESSION['accessibled_comment'][$this->comment_srl] = true;
}
function isEditable() {
if($this->isGranted() || !$this->get('member_srl')) return true;
return false;
@ -73,12 +77,19 @@
}
function isAccessible() {
if($this->isGranted()) return true;
if(!$this->isSecret()) return true;
if($_SESSION['accessibled_comment'][$this->comment_srl]) return true;
if($this->isGranted() || !$this->isSecret()) {
$this->setAccessible();
return true;
}
$oDocumentModel = &getModel('document');
$oDocument = $oDocumentModel->getDocument($this->get('document_srl'));
if($oDocument->isGranted()) return true;
if($oDocument->isGranted()) {
$this->setAccessible();
return true;
}
return false;
}