Jelajahi Sumber

#3311 Forum: browse by category isn't working for gallery unit

Alex Trofimov 5 tahun lalu
induk
melakukan
2025150b6f
1 mengubah file dengan 6 tambahan dan 2 penghapusan
  1. 6 2
      modules/boonex/forum/classes/BxForumModule.php

+ 6 - 2
modules/boonex/forum/classes/BxForumModule.php

@@ -633,8 +633,12 @@ class BxForumModule extends BxBaseModTextModule
         if(!empty($aCategory['visible_for_levels']) && !BxDolAcl::getInstance()->isMemberLevelInSet($aCategory['visible_for_levels']))
             return $bEmptyMessage ? MsgBox(_t('_sys_txt_access_denied')) : '';
 
-        if($sUnitView != 'table')   
-            return $this->_serviceBrowse($sType, $sUnitView ? array('unit_view' => $sUnitView) : false, BX_DB_PADDING_DEF, $bEmptyMessage, $bAjaxPaginate);
+        if($sUnitView != 'table')   {
+            $aParams = array('category' => $iCategory);
+            if ($sUnitView)
+                $aParams['unit_view'] = $sUnitView;
+            return $this->_serviceBrowse($sType, $aParams, BX_DB_PADDING_DEF, $bEmptyMessage, $bAjaxPaginate);
+        }
 
         return $this->_serviceBrowseTable(array(
             'type' => $sType,