@@ -746,13 +746,14 @@ class BxCoursesModule extends BxBaseModGroupsModule
$aEntryCounters = $this->_oDb->getContentStructure(['sample' => 'entry_id_counters', 'entry_id' => $iEntryId]);
$aCounters = [];
- for($i = 1; $i <= $iLevelMax; $i++) {
- $aCounters[] = [
- 'level' => $i,
- 'title' => $aLevelToNode[$i],
- 'total' => $aEntryCounters['cn_l' . $i]
- ];
- }
+ if(!empty($aEntryCounters) && is_array($aEntryCounters))
+ for($i = 1; $i <= $iLevelMax; $i++) {
+ $aCounters[] = [
+ 'level' => $i,
+ 'title' => $aLevelToNode[$i],
+ 'total' => $aEntryCounters['cn_l' . $i]
+ ];
+ }
$aResultAdd = [
'counters' => $aCounters,
@@ -39,7 +39,7 @@ class BxCoursesSearchResult extends BxBaseModGroupsSearchResult
'table' => 'bx_courses_data',
'mainField' => 'content_id',
'onField' => 'id',
- 'joinFields' => array('id', 'name', 'desc', 'picture', 'cover', 'cover_data', 'added', 'author', 'allow_view_to'),
+ 'joinFields' => array('id', 'name', 'desc', 'picture', 'cover', 'cover_data', 'added', 'author', 'allow_view_to', 'status'),
),
'account' => array(
'type' => 'INNER',