[Koha-bugs] [Bug 24745] OPAC news block plugin should evaluate as false if there are no items

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Thu Feb 27 18:26:22 CET 2020


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24745

--- Comment #1 from Owen Leonard <oleonard at myacpl.org> ---
Created attachment 99708
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=99708&action=edit
Bug 24745: OPAC news block plugin should evaluate as false if there are no
items

This patch changes the way news is returned from GetNewsToDisplay in
KohaNews.pm so that the template variable will evaluate as false instead
of simply being an empty data structure.

To reproduce the bug, remove your opacheader news entry and add this to
OpacUserCSS:

Go to the OPAC and you should see an empty blue-bordered box at the top
of the page.

To test the fix, apply the patch and reload the OPAC page. The box
should disappear. Add content to the opacheader news item and confirm
that it displays correctly.

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list