From 7ee41a75bd401ef247d0f7b1b3e63d43e4fe76cf Mon Sep 17 00:00:00 2001 From: flyskyko Date: Mon, 10 Oct 2011 08:03:03 +0000 Subject: [PATCH] issue 367, fixed a bug for do not write comment when document is secret git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@9530 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- modules/document/document.item.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/document/document.item.php b/modules/document/document.item.php index c0cfe4176..7b8cdef96 100644 --- a/modules/document/document.item.php +++ b/modules/document/document.item.php @@ -465,7 +465,7 @@ } function getComments() { - if(!$this->allowComment() || !$this->getCommentCount()) return; + if(!$this->getCommentCount()) return; if(!$this->isGranted() && $this->isSecret()) return; // cpage is a number of comment pages $cpage = Context::get('cpage'); @@ -704,9 +704,9 @@ function isEnableComment() { // Return false if not authorized, if a secret document, if the document is set not to allow any comment // old version allowed admin(isGranted() method use), but admin not allow comment below condition - if( $this->isSecret() || $this->isLocked() || !$this->allowComment() ) return false; + if( $this->isGranted() && $this->allowComment() ) return true; - return true; + return false; } /**