Don't return deleted authority records in a browse list
authordbs <dbs@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 19 Aug 2010 03:35:53 +0000 (03:35 +0000)
committerdbs <dbs@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 19 Aug 2010 03:35:53 +0000 (03:35 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@17257 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/src/perlmods/OpenILS/Application/SuperCat.pm

index 57e8a1d..c82c4aa 100644 (file)
@@ -951,8 +951,11 @@ sub authority_tag_sf_browse {
                my $before = $_storage->request(
                        "open-ils.cstore.json_query.atomic",
                        { select        => { afr => [qw/record value/] },
-                         from          => 'afr',
-                         where         => { tag => $tag, subfield => $subfield, value => { '<' => lc($value) } },
+                         from          => { 'are', 'afr' },
+                         where         => {
+                               '+afr' => { tag => $tag, subfield => $subfield, value => { '<' => lc($value) } },
+                               '+are' => { 'deleted' => 'f' }
+                         },
                          order_by      => { afr => { value => 'desc' } },
                          limit         => $before_limit,
                          offset        => abs($page) * $page_size - $before_offset,
@@ -965,8 +968,11 @@ sub authority_tag_sf_browse {
                my $after = $_storage->request(
                        "open-ils.cstore.json_query.atomic",
                        { select        => { afr => [qw/record value/] },
-                         from          => 'afr',
-                         where         => { tag => $tag, subfield => $subfield, value => { '>=' => lc($value) } }, 
+                         from          => { 'are', 'afr' },
+                         where         => {
+                               '+afr' => { tag => $tag, subfield => $subfield, value => { '>' => lc($value) } },
+                               '+are' => { 'deleted' => 'f' }
+                         },
                          order_by      => { afr => { value => 'asc' } },
                          limit         => $after_limit,
                          offset        => abs($page) * $page_size - $after_offset,