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

Ticket #3970 - Timeline: Don't show RSS if 'The length of RSS feed' is set to 0

AntonLV 4 лет назад
Родитель
Сommit
d9c1944463
1 измененных файлов с 6 добавлено и 3 удалено
  1. 6 3
      modules/boonex/timeline/classes/BxTimelineModule.php

+ 6 - 3
modules/boonex/timeline/classes/BxTimelineModule.php

@@ -730,11 +730,14 @@ class BxTimelineModule extends BxBaseModNotificationsModule implements iBxDolCon
     {
         $CNF = &$this->_oConfig->CNF;
 
-        $aArgs = func_get_args();
+        $iLength = $this->_oConfig->getRssLength();
+        if(!$iLength)
+            return;
 
-        $sType = array_shift($aArgs);
         $iOwnerId = 0;
 
+        $aArgs = func_get_args();
+        $sType = array_shift($aArgs);
         switch($sType) {
             case BX_BASE_MOD_NTFS_TYPE_OWNER:
                 $iOwnerId = array_shift($aArgs);
@@ -755,7 +758,7 @@ class BxTimelineModule extends BxBaseModNotificationsModule implements iBxDolCon
             'type' => $sType,
             'owner_id' => $iOwnerId,
             'start' => 0, 
-            'per_page' => $this->_oConfig->getRssLength(), 
+            'per_page' => $iLength, 
             'timeline' => 0, 
             'filter' => '', 
             'modules' => array()