From ce5b361fc81938695b3a7271f803d1322d93b63b Mon Sep 17 00:00:00 2001 From: Bernardo Gonzalez Kriegel Date: Tue, 3 Nov 2015 12:16:08 -0300 Subject: [PATCH] Bug 15061: Can't add item to rotating collection MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit This patch prevents adding items to invalid (empty) rotating collection id To test: 1) Go to /cgi-bin/koha/rotating_collections/addItems.pl 2) Try to add an item, you get error show in attached pictures 3) Apply the patch 4) Go again to /cgi-bin/koha/rotating_collections/addItems.pl 5) Can't add any items I don't know if this is a real problem Followed test plan, works as expected. Signed-off-by: Marc Véron Signed-off-by: Katrin Fischer Signed-off-by: Tomas Cohen Arazi (cherry picked from commit fff73a73837d577214fa3a9198fa97f8a50471f3) Signed-off-by: Frédéric Demians (cherry picked from commit a6878413151477d87955c1af30994dfa5415d180) Signed-off-by: Liz Rea --- .../prog/en/modules/rotating_collections/addItems.tt | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/rotating_collections/addItems.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/rotating_collections/addItems.tt index 6e9e725ba9..fa81cf7cc0 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/rotating_collections/addItems.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/rotating_collections/addItems.tt @@ -20,8 +20,13 @@
+ [% IF ( ! colId ) %] +
+

Invalid collection id

+

Return to rotating collections home

+
+ [% ELSE %] [% INCLUDE 'rotating-collections-toolbar.inc' %] -

Collection [% colTitle %]

[% IF ( previousActionAdd ) %] @@ -112,11 +117,11 @@
There are no items in this collection.
[% END %]
- + [% END %]
[% INCLUDE 'tools-menu.inc' %]
-[% INCLUDE 'intranet-bottom.inc' %] \ No newline at end of file +[% INCLUDE 'intranet-bottom.inc' %] -- 2.39.5