[Koha-bugs] [Bug 7073] GetCOinSBiblio should take $record, not $biblionumber

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri Nov 4 03:54:00 CET 2011


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

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

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

--- Comment #4 from Chris Cormack <chris at bigballofwax.co.nz> 2011-11-04 02:54:00 UTC ---
Created attachment 6174
  --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=6174
Bug 7073: GetCOinSBiblio should take $record object, not biblionumber

This patch changes the GetCOinsBiblio subroutine to take a MARC record object
(as returned from GetMarcBiblio) instead of a biblionumber.  The first thing
the subroutine
did was GetMarcBiblio, and the $biblionumber passed was never used again.

This subroutine was only used 3 places: opac/opac-search.pl,
opac/opac-detail.pl,
and C4/VirtualShelves/Page.pm.  In the first and last cases, it was used in a
loop.
In the last two cases, a call to GetMarcBiblio had already been done.  This is
expensive, and
we were doing it twice per record.

For opac/opac-search.pl, the call to GetMarcBiblio was moved to just outside
GetCOinSBiblio;
this will not change the performance at all.  But for opac/opac-detail.pl and
C4/VirtualShelves/Page.pm,
a redudant call to GetMarcBiblio is now avoided.

To Test:
1. Enable COinSinOPACResults in system preferences.  Perform a search in the
OPAC.
   Verify that the COinS spans are showing up
2. View the detail record of one of the returned items.  Confirm that the COinS
span exists on the detail page.
3. View a list in the OPAC.  Confirm that COinS spans are still showing up

Signed-off-by: Chris Cormack <chrisc at catalyst.net.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.


More information about the Koha-bugs mailing list