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>
Mon, 19 Sep 2011 01:12:23 +0000 (21:12 -0400)
commit843bd9002e0cff63a418999504d9fd0b74831d37
treefb5995bc6146859f8751a980cbd26d4081a9b4dd
parent765b39a1ef4660c5a25c09cf579ed575e056b769
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