From 76d53f6787532dcb1da4109f624de09e7a3335e5 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Wed, 17 Feb 2021 11:48:36 +0100 Subject: [PATCH] Bug 22544: TT plugin should return hashref only if news exist It restore the header and fix the RSS feeds (see comment 103) Signed-off-by: Martin Renvoize Signed-off-by: Marcel de Rooy Signed-off-by: Jonathan Druart --- Koha/Template/Plugin/KohaNews.pm | 2 +- koha-tmpl/opac-tmpl/bootstrap/en/modules/sci/sci-main.tt | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/Koha/Template/Plugin/KohaNews.pm b/Koha/Template/Plugin/KohaNews.pm index c6c75b4c6a..75669de861 100644 --- a/Koha/Template/Plugin/KohaNews.pm +++ b/Koha/Template/Plugin/KohaNews.pm @@ -43,7 +43,7 @@ sub get { }); - if( $content ){ + if( $content->count ){ return { content => $content, location => $display_location, diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/sci/sci-main.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/sci/sci-main.tt index a6c901af28..c146e55a03 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/sci/sci-main.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/sci/sci-main.tt @@ -20,8 +20,6 @@ (There was a problem checking in this item, please see library staff for assistance) [% END %] [% END %] -[% PROCESS 'html_helpers.inc' %] -[% SET OpacHeader = KohaNews.get( location => "opacheader", lang => lang, library => branchcode, blocktitle => 0 ) %] [% INCLUDE 'doc-head-open.inc' %] [% SET OpacLangSelectorMode = Koha.Preference('OpacLangSelectorMode') %] Self check-in › [% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha [% END %] -- 2.39.5