aCurrent = array( 'name' => 'bx_resources', 'module_name' => 'bx_resources', 'object_metatags' => 'bx_resources', 'title' => _t('_bx_resources_page_title_browse'), 'table' => 'bx_resources_entries', 'ownFields' => array('id', 'link', 'title', 'text', 'thumb', 'author', 'added'), 'searchFields' => array(), 'restriction' => array( 'author' => array('value' => '', 'field' => 'author', 'operator' => '='), 'cat' => array('value' => '', 'field' => 'cat', 'operator' => '='), 'status' => array('value' => 'active', 'field' => 'status', 'operator' => '='), 'statusAdmin' => array('value' => 'active', 'field' => 'status_admin', 'operator' => '='), ), 'paginate' => array('perPage' => getParam('bx_resources_per_page_browse'), 'start' => 0), 'sorting' => 'last', 'rss' => array( 'title' => '', 'link' => '', 'image' => '', 'profile' => 0, 'fields' => array ( 'Guid' => 'link', 'Link' => 'link', 'Title' => 'title', 'DateTimeUTS' => 'added', 'Desc' => 'text', 'Image' => 'thumb' ), ), 'ident' => 'id', ); $this->sFilterName = 'bx_resources_filter'; $this->oModule = $this->getMain(); $CNF = &$this->oModule->_oConfig->CNF; $sSearchFields = getParam($CNF['PARAM_SEARCHABLE_FIELDS']); $this->aCurrent['searchFields'] = !empty($sSearchFields) ? explode(',', $sSearchFields) : ''; $oProfileAuthor = null; switch ($sMode) { case 'author': if(!$this->_updateCurrentForAuthor($sMode, $aParams, $oProfileAuthor)) $this->isError = true; break; case 'context': if(!$this->_updateCurrentForContext($sMode, $aParams, $oProfileAuthor)) { $this->isError = true; break; } if(($sCategory = $aParams['category'] ?? false)) $this->aCurrent['restriction']['cat']['value'] = $sCategory; break; case '': // search results $this->sBrowseUrl = BX_DOL_SEARCH_KEYWORD_PAGE; $this->aCurrent['title'] = _t('_bx_resources'); unset($this->aCurrent['paginate']['perPage'], $this->aCurrent['rss']); break; default: $sMode = ''; $this->isError = true; } $this->processReplaceableMarkers($oProfileAuthor); $this->addConditionsForPrivateContent($CNF, $oProfileAuthor); } } /** @} */