[Koha-bugs] [Bug 6790] C4::Serials::getroutinglist returns unnecessary variable

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Sat Dec 31 08:27:48 CET 2011


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

Chris Cormack <chris at bigballofwax.co.nz> changed:

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

--- Comment #6 from Chris Cormack <chris at bigballofwax.co.nz> 2011-12-31 07:27:48 UTC ---
Created attachment 6990
  --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=6990
Bug 6790: Remove unnecessary variable from getroutinglist return

getroutinglist returns a count variable to indicate how many elements
are in the array. This is almost always a serious code smell. (We are
programming in a list manipulating language) The routine was executing
am unnecessary loop just to maintain that var.
Removed the variable from the routine and perldoc
refactored calls of the routine removed the c-style loops for
more idiomatic and maintainable for loops
renamed some opaquely named variables
removed a call to the routine where nothing was done with the data
moved some html out of the calling script and into the template

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

-- 
Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA Contact for the bug.
You are watching all bug changes.


More information about the Koha-bugs mailing list