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>
Thu, 22 Sep 2011 03:07:40 +0000 (23:07 -0400)
commit2b6d8dca282e861dd160b2ac2f9eb23c03e08e66
treec51e85698d587954ff5dbba50988c14a4df10619
parent3c8b202b3eaf805eb98d3e7f048ef4f2981a435f
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