[Koha-bugs] [Bug 5687] Add preference for display of AuthorisedValueImages at staff search results

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Wed Mar 9 20:35:54 CET 2011


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

Ian Walls <ian.walls at bywatersolutions.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ian.walls at bywatersolutions.
                   |                            |com

--- Comment #11 from MJ Ray (software.coop) <mjr at ttllp.co.uk> 2011-03-04 10:26:59 UTC ---
This bug is mentioned in:
Bug 5687: Add pref StaffAuthorisedValueImages for staff search results
http://lists.koha-community.org/pipermail/koha-patches/2011-February/013752.html
Bug 5687: Add pref StaffAuthorisedValueImages for staff search results
http://lists.koha-community.org/pipermail/koha-patches/2011-February/013753.html
Bug 5687: Add pref StaffAuthorisedValueImages for staff search results
http://lists.koha-community.org/pipermail/koha-patches/2011-February/013771.html

--- Comment #12 from Ian Walls <ian.walls at bywatersolutions.com> 2011-03-09 19:35:54 UTC ---
I'd recommend that a conditional be added to C4::Search::searchResults to only
populate $oldbiblio->{'authorised_value_images'} if they're going to be used by
the requesting search results page.  That is:

IF (($search_context == 'opac' and AuthorisedValueImages) OR ($search_context
== 'intranet' and StaffAuthorisedValueImages))

The call to get authorised values can be very expensive, and if it's not going
to be used in the output, we could save ourselves some processing time
(possibly over 1 second's worth) when performing a search by never invoking the
subroutine.

This would also simplify the template: we wouldn't need a nested conditional
for both the system preference AuthorisedValueImages and the existence of the
images themselves; they would only exist if they were supposed to.

-- 
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