http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7567
Chris Cormack <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #23664|0 |1 is obsolete| | --- Comment #55 from Chris Cormack <[email protected]> --- Created attachment 25323 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=25323&action=edit Bug 7567 - Too many parameters and tiny bugs Changed the add and update functions to use a hash reference for the parameter, so that adding or subtracting parameters should be easier. Added some POD for the add_opac_news and upd_opac_news functions, so that developers would know how to call it. The hashref changes resulted in being able to return 0 for failure and 1 for success. This meant adding a couple tests to the test file. And while testing, there was some sort of logic problem with the matter of '' being all, but selecting all only showed things set for all, and excluded particular languages, or other interfaces. Signed-off-by: Chris Cormack <[email protected]> 1..10 ok 1 - use C4::NewsChannels; ok 2 - Correctly failed on no parameter! ok 3 - Successfully added the first dummy news item! ok 4 - Successfully added the second dummy news item! ok 5 - Correctly failed on no parameter! ok 6 - Successfully updated second dummy news item! ok 7 - Successfully tested get_opac_new id1 (0)! ok 8 - Successfully tested get_opac_new id2 (0)! ok 9 - Successfully tested get_opac_news! ok 10 - Successfully tested GetNewsToDisplay! My only nitpick here is the variable naming ... hashref is a really bad name for a variable. But I will sign off, because apart from that it is a good clean up -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list [email protected] http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
