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 <veron@veron.ch>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit
fff73a73837d577214fa3a9198fa97f8a50471f3)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit
a6878413151477d87955c1af30994dfa5415d180)
Signed-off-by: Liz Rea <wizzyrea@gmail.com>
<div id="yui-main">
<div class="yui-b">
+ [% IF ( ! colId ) %]
+ <div class="dialog message">
+ <p>Invalid collection id</p>
+ <p><a href="/cgi-bin/koha/rotating_collections/rotatingCollections.pl">Return to rotating collections home</a></p>
+ </div>
+ [% ELSE %]
[% INCLUDE 'rotating-collections-toolbar.inc' %]
-
<h1>Collection <i>[% colTitle %]</i></h1>
[% IF ( previousActionAdd ) %]
<div class="dialog message">There are no items in this collection.</div>
[% END %]
</div>
-
+ [% END %]
</div> <!-- /.yui-b -->
</div> <!-- /#yui-main -->
<div class="yui-b">
[% INCLUDE 'tools-menu.inc' %]
</div>
</div> <!-- /#bd -->
-[% INCLUDE 'intranet-bottom.inc' %]
\ No newline at end of file
+[% INCLUDE 'intranet-bottom.inc' %]