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

Ticket #4571 - Enable/disable is not work on /page/channels-administration.

AntonLV 2 лет назад
Родитель
Сommit
dfd2b10bf2
1 измененных файлов с 4 добавлено и 2 удалено
  1. 4 2
      modules/boonex/channels/classes/BxCnlAlertsResponse.php

+ 4 - 2
modules/boonex/channels/classes/BxCnlAlertsResponse.php

@@ -53,8 +53,10 @@ class BxCnlAlertsResponse extends BxBaseModGroupsAlertsResponse
             if (isset($oAlert->aExtras['keyword'])){
                 $sName = $oAlert->aExtras['keyword'];
                 $iCnlId = $this->_oModule->_oDb->getChannelIdByName($sName);
-                if ($iCnlId > 0){
-                    $oAlert->aExtras['url'] = $this->_oModule->serviceProfileUrl($iCnlId);
+                if ($iCnlId > 0) {
+                    $aContentInfo = $this->_oModule->_oDb->getContentInfoById($iCnlId);
+                    if($aContentInfo[$CNF['FIELD_STATUS']] == BX_BASE_MOD_GENERAL_STATUS_ACTIVE && $aContentInfo[$CNF['FIELD_STATUS_ADMIN']] == BX_BASE_MOD_GENERAL_STATUS_ACTIVE)
+                        $oAlert->aExtras['url'] = $this->_oModule->serviceProfileUrl($iCnlId);
                 }
             }
         }