Don't show deleted authority records in startwith browse, either
authordbs <dbs@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 19 Aug 2010 03:47:35 +0000 (03:47 +0000)
committerdbs <dbs@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 19 Aug 2010 03:47:35 +0000 (03:47 +0000)
Also restore the >= operator that was stomped in r17257

git-svn-id: svn://svn.open-ils.org/ILS/trunk@17258 dcc99617-32d9-48b4-a31d-7c20da2025e4

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

index c82c4aa..ee58869 100644 (file)
@@ -970,7 +970,7 @@ sub authority_tag_sf_browse {
                        { select        => { afr => [qw/record value/] },
                          from          => { 'are', 'afr' },
                          where         => {
-                               '+afr' => { tag => $tag, subfield => $subfield, value => { '>' => lc($value) } },
+                               '+afr' => { tag => $tag, subfield => $subfield, value => { '>=' => lc($value) } },
                                '+are' => { 'deleted' => 'f' }
                          },
                          order_by      => { afr => { value => 'asc' } },
@@ -1368,8 +1368,11 @@ sub authority_tag_sf_startwith {
                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          => { 'afr', 'are' },
+                         where         => {
+                               '+afr' => { tag => $tag, subfield => $subfield, value => { '<' => lc($value) } },
+                               '+are' => { deleted => 'f' }
+                         },
                          order_by      => { afr => { value => 'desc' } },
                          limit         => $limit,
                          offset        => $offset
@@ -1382,8 +1385,11 @@ sub authority_tag_sf_startwith {
                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          => { 'afr', 'are' },
+                         where         => {
+                               '+afr' => { tag => $tag, subfield => $subfield, value => { '>=' => lc($value) } },
+                               '+are' => { deleted => 'f' }
+                         },
                          order_by      => { afr => { value => 'asc' } },
                          limit         => $limit,
                          offset        => $offset