allow .staff methods to be scoped, but remove visiblitiy checks
authormiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 20 Jan 2006 19:04:51 +0000 (19:04 +0000)
committermiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 20 Jan 2006 19:04:51 +0000 (19:04 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@2767 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/metabib.pm

index 8dbbc7b..c62235c 100644 (file)
@@ -1229,10 +1229,12 @@ sub postfilter_search_multi_class_fts {
                                $asset_copy_table cp,
                                $cs_table cs,
                                $cl_table cl,
+                               $br_table br,
                                $descendants d,
                                $metabib_record_descriptor ord,
                                ($select) s
                          WHERE mrs.metarecord = s.metarecord
+                               AND br.id = mrs.source
                                AND cn.record = mrs.source
                                AND cp.status = cs.id
                                AND cp.location = cl.id
@@ -1241,6 +1243,26 @@ sub postfilter_search_multi_class_fts {
                                AND cp.opac_visible IS TRUE
                                AND cs.holdable IS TRUE
                                AND cl.opac_visible IS TRUE
+                               AND br.active IS TRUE
+                               AND ord.record = mrs.source
+                               $ot_filter
+                               $of_filter
+                         ORDER BY 2 DESC
+               SQL
+       } else {
+               $select = <<"           SQL";
+
+                       SELECT  DISTINCT s.*
+                         FROM  $asset_call_number_table cn,
+                               $metabib_metarecord_source_map_table mrs,
+                               $asset_copy_table cp,
+                               $descendants d,
+                               $metabib_record_descriptor ord,
+                               ($select) s
+                         WHERE mrs.metarecord = s.metarecord
+                               AND cn.record = mrs.source
+                               AND cn.owning_lib = d.id
+                               AND cp.call_number = cn.id
                                AND ord.record = mrs.source
                                $ot_filter
                                $of_filter