Просмотр исходного кода

#3998 - Minor fixes (allow to post comments)

roman.lesnikov@gmail.com 4 лет назад
Родитель
Сommit
aee916b421
1 измененных файлов с 2 добавлено и 3 удалено
  1. 2 3
      template/scripts/BxBaseCmts.php

+ 2 - 3
template/scripts/BxBaseCmts.php

@@ -394,7 +394,7 @@ class BxBaseCmts extends BxDolCmts
         }
 
         $oProfileAuthor = BxDolProfile::getInstance($aCmt['cmt_author_id']);
-        if($this->_isAllowShowComments($aCmt)) {
+        if($this->_isShowContent($aCmt)) {
             $sContent = $this->_getContent($aCmt, $aBp, $aDp);
         }
         else {
@@ -722,11 +722,10 @@ class BxBaseCmts extends BxDolCmts
         return $this->_oQuery->getCommentsBy(array('type' => 'object_id', 'object_id' => $this->getId(), 'order_way' => 'desc', 'start' => $iCmtsStart, 'per_page' => $iCmtsLimit * 4));
     }
     
-    private function _isAllowShowComments($aCmt)
+    private function _isShowContent($aCmt)
     {
         $oProfileAuthor = BxDolProfile::getInstance($aCmt['cmt_author_id']);
         return ($oProfileAuthor && $oProfileAuthor->isActive()) || isAdmin() || BxDolAcl::getInstance()->isMemberLevelInSet([MEMBERSHIP_ID_MODERATOR, MEMBERSHIP_ID_ADMINISTRATOR]);
-          
     }
     
     public function getCounter($aParams = [])