['filter' => FILTER_UNSAFE_RAW]]; public function __construct($pageCall, $pageParam) { $this->getCategoryFromUrl($pageParam); if (isset($this->category[0])) header('Location: ?sounds&filter=ty='.$this->category[0], true, 302); $this->filterObj = new SoundListFilter(); parent::__construct($pageCall, $pageParam); $this->name = Util::ucFirst(Lang::game('sounds')); } protected function generateContent() { $this->redButtons = array( BUTTON_WOWHEAD => true, BUTTON_PLAYLIST => true ); $conditions = []; if ($_ = $this->filterObj->getConditions()) $conditions[] = $_; $this->filter = $this->filterObj->getForm(); $this->filter['query'] = $this->_get['filter']; $tabData = []; $sounds = new SoundList($conditions, ['calcTotal' => true]); if (!$sounds->error) { $tabData['data'] = array_values($sounds->getListviewData()); // create note if search limit was exceeded; overwriting 'note' is intentional if ($sounds->getMatches() > Cfg::get('SQL_LIMIT_DEFAULT')) { $tabData['note'] = sprintf(Util::$tryFilteringString, 'LANG.lvnote_soundsfound', $sounds->getMatches(), Cfg::get('SQL_LIMIT_DEFAULT')); $tabData['_truncated'] = 1; } if ($this->filterObj->error) $tabData['_errors'] = 1; } $this->lvTabs[] = [SoundList::$brickFile, $tabData]; } protected function postCache() { // sort for dropdown-menus Lang::sort('sound', 'cat'); } protected function generateTitle() { array_unshift($this->title, $this->name); $form = $this->filterObj->getForm(); if (isset($form['ty']) && count($form['ty']) == 1) array_unshift($this->title, Lang::sound('cat', $form['ty'][0])); } protected function generatePath() { $form = $this->filterObj->getForm(); if (isset($form['ty']) && count($form['ty']) == 1) $this->path[] = $form['ty'][0]; } } ?>