From: Bill Erickson Date: Fri, 1 Aug 2014 20:32:44 +0000 (-0400) Subject: LP#1347774 'mfr' IDL pcrud access; added content uses pcrud X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=0dce3221f79fb49f0a057821422759e1bf297c68;p=working%2FEvergreen.git LP#1347774 'mfr' IDL pcrud access; added content uses pcrud Signed-off-by: Bill Erickson --- diff --git a/Open-ILS/examples/fm_IDL.xml b/Open-ILS/examples/fm_IDL.xml index e574b29e77..6755bf93fb 100644 --- a/Open-ILS/examples/fm_IDL.xml +++ b/Open-ILS/examples/fm_IDL.xml @@ -3321,7 +3321,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - + @@ -3334,6 +3334,11 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + + + + + diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/AddedContent.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/AddedContent.pm index e1c0bf03bb..5c0f3415a2 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/AddedContent.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/AddedContent.pm @@ -15,7 +15,7 @@ use OpenSRF::EX qw(:try); use OpenSRF::Utils::Cache; use OpenSRF::System; use OpenSRF::Utils::Logger qw/$logger/; -use OpenILS::Utils::CStoreEditor; +use OpenILS::Utils::CStoreEditor (':funcs', personality => 'open-ils.pcrud'); use LWP::UserAgent; use MIME::Base64; @@ -200,32 +200,32 @@ sub handler { # returns [{tag => $tag, value => $value}, {tag => $tag2, value => $value2}] sub get_rec_keys { my $id = shift; - return OpenILS::Utils::CStoreEditor->new->json_query({ - select => {mfr => ['tag', 'value']}, - from => 'mfr', - where => { - record => $id, - '-or' => [ - { - '-and' => [ - {tag => '020'}, - {subfield => 'a'} - ] - }, { - '-and' => [ - {tag => '022'}, - {subfield => 'a'} - ] - }, { - '-and' => [ - {tag => '024'}, - {subfield => 'a'}, - {ind1 => 1} - ] - } - ] - } + my $keys = new_editor()->search_metabib_full_rec({ + record => $id, + '-or' => [ + { + '-and' => [ + {tag => '020'}, + {subfield => 'a'} + ] + }, { + '-and' => [ + {tag => '022'}, + {subfield => 'a'} + ] + }, { + '-and' => [ + {tag => '024'}, + {subfield => 'a'}, + {ind1 => 1} + ] + } + ] }); + + return [ + map {{tag => $_->tag, value => $_->value}} @$keys + ]; } sub print_content {