TPAC: Give MFHD summaries OU / depth awareness
authorDan Scott <dscott@laurentian.ca>
Mon, 19 Sep 2011 01:12:23 +0000 (21:12 -0400)
committerDan Scott <dscott@laurentian.ca>
Fri, 23 Sep 2011 17:18:52 +0000 (13:18 -0400)
commite7f6d7531e15e911f65c8387474814a1b4b0ac81
tree57a41d0c3ae141d43ab8142d9cadac86c9cf78ae
parentbeca0dd026895973eb9f0779aa79f30005208f21
TPAC: Give MFHD summaries OU / depth awareness

Rather than returning all results and filtering on the client-side, as
we're currently doing in the JSPAC, teach the
open-ils.search.serial.record.bib.retrieve method to accept optional OU
& OU depth arguments and do the filtering in the query; cuts down on
network traffic and should be generally more efficient.

Note that in the absence of an explicit "depth" CGI param,
EGCatLoader/Record currently defaults to a depth of "0"; we could
teach it to look up & cache the depth of the "loc" param for the sake of
convenience & arguably more accuracy.

Also note that the sub/dist serial approach probably needs to be taught
similar method-side filtering, but I hope more knowledgeable brains will
work out what should happen with ssub.holding_lib / sdist.owning_lib.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
Open-ILS/src/perlmods/lib/OpenILS/Application/Search/Serial.pm
Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Record.pm