TPAC: Don't hide OPAC-invisible bibs in My Lists collab/senator/all-bibs-in-bookbag
authorLebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Sat, 28 Apr 2012 22:24:38 +0000 (18:24 -0400)
committerLebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Sat, 28 Apr 2012 22:24:38 +0000 (18:24 -0400)
We use Search under the hood to get the record IDs because Search lets
us filter and sort by lots of columns.  We need to use a staff search
(i.e., ignore OPAC visibility) even when we're not really staff, because
in My Lists you want to see your records whether they would be visible
in other contexts or not (so regardless of number of holdings, etc).

Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm

index bf01bc4..218127a 100644 (file)
@@ -324,8 +324,11 @@ sub _get_bookbag_sort_params {
 sub _prepare_bookbag_container_query {
     my ($self, $container_id, $sorter, $modifier) = @_;
 
+    # The #staff modifier here just makes sure that we never get bib records
+    # hidden in bookbags because of OPAC visibility concerns.  It's not
+    # actually got anything to do with the staff client in this case.
     return sprintf(
-        "container(bre,bookbag,%d,%s)%s%s",
+        "container(bre,bookbag,%d,%s)%s%s #staff",
         $container_id, $self->editor->authtoken,
         ($sorter ? " sort($sorter)" : ""),
         ($modifier ? "#$modifier" : "")