From 2e2d625a4202e04c75d4892d03eeaaeeaa56bf4f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Novotn=C3=BD?= <witiko@mail.muni.cz> Date: Wed, 18 Sep 2019 18:25:08 +0200 Subject: [PATCH] Make empty searches skip authority recommendations (#1433) --- module/VuFind/src/VuFind/Recommend/AuthorityRecommend.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/module/VuFind/src/VuFind/Recommend/AuthorityRecommend.php b/module/VuFind/src/VuFind/Recommend/AuthorityRecommend.php index 526ca2bacd3..9dc4887b472 100644 --- a/module/VuFind/src/VuFind/Recommend/AuthorityRecommend.php +++ b/module/VuFind/src/VuFind/Recommend/AuthorityRecommend.php @@ -281,6 +281,11 @@ class AuthorityRecommend implements RecommendInterface { $this->results = $results; + // empty searches such as New Items will return blank + if ($this->lookfor == NULL) { + return; + } + // function will return blank on Advanced Search if ($results->getParams()->getSearchType() == 'advanced') { return; -- GitLab