[Koha-bugs] [Bug 7567] News by Library: refactor, enhance, and fix

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Wed Mar 26 18:20:52 CET 2014


http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7567

M. Tompsett <mtompset at hotmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #26596|0                           |1
        is obsolete|                            |

--- Comment #89 from M. Tompsett <mtompset at hotmail.com> ---
Created attachment 26607
  -->
http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=26607&action=edit
Bug 7567 - Removed finish calls

"When all the data has been fetched from a SELECT statement,
the driver will automatically call finish for you. So you should
not call it explicitly except when you know that you've not
fetched all the data from a statement handle and the handle
won't be destroyed soon."
(http://search.cpan.org/~timb/DBI-1.627/DBI.pm#finish)

All the $sth variables were scoped within the functions,
and would be destroyed immediately. Additionally, there was
one after a SELECT, for only a single idnew, and so it was
not necessary.

TEST PLAN
---------
1) prove -v t/db_dependent/NewsChannels.t
2) apply patch
3) prove -v t/db_dependent/NewsChannels.t

Signed-off-by: Chris Cormack <chris at bigballofwax.co.nz>

ok 1 - use C4::NewsChannels;
ok 2 - Successfully added the first dummy news item!
ok 3 - Successfully added the second dummy news item!
ok 4 - Successfully updated second dummy news item!
ok 5 - Successfully tested get_opac_new id1!
ok 6 - Successfully tested get_opac_new id2!
ok 7 - Successfully tested get_opac_news!
ok 8 - Successfully tested GetNewsToDisplay!

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


More information about the Koha-bugs mailing list