diff options
Diffstat (limited to 'app/controllers/search/module.php')
| -rw-r--r-- | app/controllers/search/module.php | 34 |
1 files changed, 18 insertions, 16 deletions
diff --git a/app/controllers/search/module.php b/app/controllers/search/module.php index dd555e0..57e24d3 100644 --- a/app/controllers/search/module.php +++ b/app/controllers/search/module.php @@ -119,12 +119,15 @@ class Search_ModuleController extends MVVController } if ($do_search) { - PageLayout::postInfo(sprintf(ngettext( - '%s Modul gefunden für die Suche nach <em>%s</em>', - '%s Module gefunden für die Suche nach <em>%s</em>', - count($this->search_result['Modul'])), - count($this->search_result['Modul']), - htmlReady($this->sterm))); + PageLayout::postInfo(sprintf( + ngettext( + '%s Modul gefunden für die Suche nach <em>%s</em>', + '%s Module gefunden für die Suche nach <em>%s</em>', + count($this->search_result['Modul']) + ), + count($this->search_result['Modul']), + htmlReady($this->sterm) + )); } } @@ -147,14 +150,11 @@ class Search_ModuleController extends MVVController $sidebar->addWidget($widget, 'sem_filter'); $this->input_search = $this->sterm; - $this->result_count = is_array($this->search_result['Modul']) ? count($this->search_result['Modul']) : 0; - - $drill_down['studiengaenge']['objects'] = - $this->drilldown_studiengaenge($this->search_result['Modul']); - $drill_down['faecher']['objects'] = - $this->drilldown_faecher($this->search_result['Modul']); - $drill_down['institutes']['objects'] = - $this->drilldown_institutes($this->search_result['Modul']); + $this->result_count = is_array($this->search_result['Modul'] ?? null) ? count($this->search_result['Modul']) : 0; + + $drill_down['studiengaenge']['objects'] = $this->drilldown_studiengaenge($this->search_result['Modul'] ?? null); + $drill_down['faecher']['objects'] = $this->drilldown_faecher($this->search_result['Modul'] ?? null); + $drill_down['institutes']['objects'] = $this->drilldown_institutes($this->search_result['Modul'] ?? null); if (count($drill_down['institutes']['objects']) || count($drill_down['studiengaenge']['objects']) || count($drill_down['faecher']['objects'])) { @@ -214,8 +214,10 @@ class Search_ModuleController extends MVVController } $this->module = []; - if (is_array($this->search_result['Modul']) - && count($this->search_result['Modul'])) { + if (isset($this->search_result['Modul']) + && is_array($this->search_result['Modul']) + && count($this->search_result['Modul']) + ) { if (!empty($this->drill_down_type) && !empty($this->drill_down_id)) { $this->search_result['Modul'] = $this->filter_modules( $this->search_result['Modul'], $this->drill_down_type, $this->drill_down_id); |
