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

Merge branch 'master' of https://github.com/unaio/una

AntonLV 3 лет назад
Родитель
Сommit
9624bdf6f0

+ 1 - 1
modules/boonex/stream/classes/BxStrmEngineOvenMediaEngine.php

@@ -201,7 +201,7 @@ class BxStrmEngineOvenMediaEngine extends BxDol
         if (!$sApiProtocol || !$sHost || !$iApiPort || !$sApiKey)
             return false;
 
-        $sUrl = "http://{$sHost}:$iApiPort/v1{$sUri}";
+        $sUrl = $sApiProtocol . "://{$sHost}:$iApiPort/v1{$sUri}";
         $s = bx_file_get_contents($sUrl, $aBody, $sMethod, ['Authorization: Basic ' . $sApiKey]);
         bx_log('bx_stream_ome_api', $sUrl . "\n" . $s);
         if (!$s)

+ 2 - 7
template/scripts/BxBaseCmts.php

@@ -449,7 +449,6 @@ class BxBaseCmts extends BxDolCmts
             }
         }
 
-        $oProfileAuthor = BxDolProfile::getInstance($aCmt['cmt_author_id']);
         if($this->_isShowContent($aCmt)) {
             $sContent = $this->_getContent($aCmt, $aBp, $aDp);
         }
@@ -983,13 +982,9 @@ class BxBaseCmts extends BxDolCmts
         return self::$_sTmplContentCounter;
     }
 
-
-    /**
-     * private functions
-     */
-    private function _isShowContent($aCmt)
+    protected function _isShowContent($aCmt)
     {
-        $oProfileAuthor = BxDolProfile::getInstance($aCmt['cmt_author_id']);
+        $oProfileAuthor = BxDolProfile::getInstance(abs($aCmt['cmt_author_id']));
         return (int)$aCmt['cmt_author_id'] == 0 || ($oProfileAuthor && $oProfileAuthor->isActive()) || isAdmin() || BxDolAcl::getInstance()->isMemberLevelInSet([MEMBERSHIP_ID_MODERATOR, MEMBERSHIP_ID_ADMINISTRATOR]);
     }