diff --git a/module/VuFind/src/VuFind/Controller/AbstractSearch.php b/module/VuFind/src/VuFind/Controller/AbstractSearch.php index 31574d8938e508745f81e00b8d4848c6ff696b9a..2e03548da99e9276213462e6650c9090e7c08d03 100644 --- a/module/VuFind/src/VuFind/Controller/AbstractSearch.php +++ b/module/VuFind/src/VuFind/Controller/AbstractSearch.php @@ -242,6 +242,16 @@ class AbstractSearch extends AbstractBase }; } + /** + * Home action + * + * @return mixed + */ + public function homeAction() + { + return $this->createViewModel(); + } + /** * Send search results to results view * diff --git a/module/VuFind/src/VuFind/Controller/AuthorController.php b/module/VuFind/src/VuFind/Controller/AuthorController.php index fba275758af93da8e42e40e4ec18ed3d63553849..e659071771ec71ebbf0c504b2ebb5b17decf373c 100644 --- a/module/VuFind/src/VuFind/Controller/AuthorController.php +++ b/module/VuFind/src/VuFind/Controller/AuthorController.php @@ -95,10 +95,8 @@ class AuthorController extends AbstractSearch // If an author was requested, forward to the results page; otherwise, // display the search form: $author = $this->params()->fromQuery('author'); - if (!empty($author)) { - return $this->forwardTo('Author', 'Results'); - } - return $this->createViewModel(); + return !empty($author) + ? $this->forwardTo('Author', 'Results') : parent::homeAction(); } /** diff --git a/module/VuFind/src/VuFind/Controller/AuthorityController.php b/module/VuFind/src/VuFind/Controller/AuthorityController.php index 7a747fe121cb046a6ec94505701e9de57006aa1a..d560c24ce3e5817c82aa0fa54a5d738131ca579f 100644 --- a/module/VuFind/src/VuFind/Controller/AuthorityController.php +++ b/module/VuFind/src/VuFind/Controller/AuthorityController.php @@ -64,8 +64,8 @@ class AuthorityController extends AbstractSearch return $this->forwardTo('Authority', 'Record'); } - // Do nothing -- just display template - return $this->createViewModel(); + // Default behavior: + return parent::homeAction(); } /** diff --git a/module/VuFind/src/VuFind/Controller/BrowZineController.php b/module/VuFind/src/VuFind/Controller/BrowZineController.php index eedebb315d129e677a81bc37c5d3b57a4a07b95f..0bfe9da11cf16d5d445891c1b2b7942ec4a180b4 100644 --- a/module/VuFind/src/VuFind/Controller/BrowZineController.php +++ b/module/VuFind/src/VuFind/Controller/BrowZineController.php @@ -51,16 +51,6 @@ class BrowZineController extends AbstractSearch parent::__construct($sm); } - /** - * Home action - * - * @return mixed - */ - public function homeAction() - { - return $this->createViewModel(); - } - /** * Search action -- call standard results action * diff --git a/module/VuFind/src/VuFind/Controller/CombinedController.php b/module/VuFind/src/VuFind/Controller/CombinedController.php index 9caa23b02a00bbb5f0e1393ae05cf3064b4ceb9e..8b9a3ca2732542ed97e552423d1af20f5bbeed31 100644 --- a/module/VuFind/src/VuFind/Controller/CombinedController.php +++ b/module/VuFind/src/VuFind/Controller/CombinedController.php @@ -53,16 +53,6 @@ class CombinedController extends AbstractSearch parent::__construct($sm); } - /** - * Home action - * - * @return mixed - */ - public function homeAction() - { - return $this->createViewModel(); - } - /** * Single result action (used for AJAX) * diff --git a/module/VuFind/src/VuFind/Controller/EITController.php b/module/VuFind/src/VuFind/Controller/EITController.php index 282b040d12d2548adbd8e978430d39c585d8cead..b38f4dfd7e6ca4418727cbc3185e0943fce94113 100644 --- a/module/VuFind/src/VuFind/Controller/EITController.php +++ b/module/VuFind/src/VuFind/Controller/EITController.php @@ -65,17 +65,6 @@ class EITController extends AbstractSearch && $config->Record->next_prev_navigation; } - /** - * Home action - * - * @return mixed - */ - public function homeAction() - { - // Set up default parameters: - return $this->createViewModel(); - } - /** * Search action -- call standard results action * diff --git a/module/VuFind/src/VuFind/Controller/EdsController.php b/module/VuFind/src/VuFind/Controller/EdsController.php index 055487be092e297db52574877daaeb2650cd917c..cb49ea2d27e28768e43fae6ec0a2f2746fd70604 100644 --- a/module/VuFind/src/VuFind/Controller/EdsController.php +++ b/module/VuFind/src/VuFind/Controller/EdsController.php @@ -92,7 +92,7 @@ class EdsController extends AbstractSearch public function homeAction() { $this->setUp(); - return $this->createViewModel(); + return parent::homeAction(); } /** diff --git a/module/VuFind/src/VuFind/Controller/LibGuidesController.php b/module/VuFind/src/VuFind/Controller/LibGuidesController.php index 1a99d2187b87cc9e82f2e57989dca3897ca8d85d..a31fa3c6bf383f268449aba4e4d38f6d1f0e4ba6 100644 --- a/module/VuFind/src/VuFind/Controller/LibGuidesController.php +++ b/module/VuFind/src/VuFind/Controller/LibGuidesController.php @@ -51,16 +51,6 @@ class LibGuidesController extends AbstractSearch parent::__construct($sm); } - /** - * Home action - * - * @return mixed - */ - public function homeAction() - { - return $this->createViewModel(); - } - /** * Is the result scroller active? * diff --git a/module/VuFind/src/VuFind/Controller/Pazpar2Controller.php b/module/VuFind/src/VuFind/Controller/Pazpar2Controller.php index 32fa508f7755958d3c0bf892ea33cd58697eb832..d49a9c6af5c37319b40ce545fe138c0eaecc34e7 100644 --- a/module/VuFind/src/VuFind/Controller/Pazpar2Controller.php +++ b/module/VuFind/src/VuFind/Controller/Pazpar2Controller.php @@ -51,17 +51,6 @@ class Pazpar2Controller extends AbstractSearch parent::__construct($sm); } - /** - * Home action - * - * @return mixed - */ - public function homeAction() - { - // Set up default parameters: - return $this->createViewModel(); - } - /** * Search action -- call standard results action * diff --git a/module/VuFind/src/VuFind/Controller/PrimoController.php b/module/VuFind/src/VuFind/Controller/PrimoController.php index 1c950799d781433ea9f817a42c2b84a8189d64db..f511f36cdf6e58d47758002951769d58245650eb 100644 --- a/module/VuFind/src/VuFind/Controller/PrimoController.php +++ b/module/VuFind/src/VuFind/Controller/PrimoController.php @@ -52,16 +52,6 @@ class PrimoController extends AbstractSearch parent::__construct($sm); } - /** - * Home action - * - * @return mixed - */ - public function homeAction() - { - return $this->createViewModel(); - } - /** * Is the result scroller active? * diff --git a/module/VuFind/src/VuFind/Controller/TagController.php b/module/VuFind/src/VuFind/Controller/TagController.php index d5906cd2b9d3225bc289a5cc24e80f3ff9ae2fc4..5866d0c8b07bec2bea0adc10149efdeb10a68250 100644 --- a/module/VuFind/src/VuFind/Controller/TagController.php +++ b/module/VuFind/src/VuFind/Controller/TagController.php @@ -62,6 +62,6 @@ class TagController extends AbstractSearch if (!$this->tagsEnabled()) { throw new ForbiddenException('Tags disabled'); } - return $this->resultsAction(); + return parent::homeAction(); } } diff --git a/module/VuFind/src/VuFind/Controller/WebController.php b/module/VuFind/src/VuFind/Controller/WebController.php index 16d92cea09c4e10b902f9216a4df125e704062d3..59f5228f96a00979154e7d2c8335439db892e552 100644 --- a/module/VuFind/src/VuFind/Controller/WebController.php +++ b/module/VuFind/src/VuFind/Controller/WebController.php @@ -51,17 +51,6 @@ class WebController extends AbstractSearch parent::__construct($sm); } - /** - * Home action - * - * @return \Zend\View\Model\ViewModel - */ - public function homeAction() - { - // Do nothing -- just display template - return $this->createViewModel(); - } - /** * Process the jumpto parameter -- either redirect to a specific record and * return view model, or ignore the parameter and return false. diff --git a/module/VuFind/src/VuFind/Controller/WorldcatController.php b/module/VuFind/src/VuFind/Controller/WorldcatController.php index ce46bdfe9f6c85fd3ff39d25fd649e905274178e..8754974368221baf2c4ff1256c6e926226f12047 100644 --- a/module/VuFind/src/VuFind/Controller/WorldcatController.php +++ b/module/VuFind/src/VuFind/Controller/WorldcatController.php @@ -64,17 +64,6 @@ class WorldcatController extends AbstractSearch && $config->Record->next_prev_navigation; } - /** - * Home action - * - * @return mixed - */ - public function homeAction() - { - // Set up default parameters: - return $this->createViewModel(); - } - /** * Search action -- call standard results action *