From: Lebbeous Fogle-Weekley Date: Mon, 20 Aug 2012 18:22:06 +0000 (-0400) Subject: Deal with moved publish_fieldmapper() method X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=27d165b1bfd7f3262319b829889562c90e7f868a;p=evergreen%2Fequinox.git Deal with moved publish_fieldmapper() method This is a companion commit to fac45ab9b1cb8924 / Move Fieldmapper API call to Application.pm Without it, Flattener and Action/Trigger stop working with errors like this: [Mon Aug 20 13:50:18 2012] [error] [client XXX.XXX.XXX.XXX] Exception: OpenSRF::EX::ERROR 2012-08-20T13:50:18 main -e:0 System ERROR: Exception: OpenSRF::DomainObject::oilsMethodException 2012-08-20T13:50:18 OpenSRF::AppRequest /usr/local/share/perl/5.10.1/OpenSRF/AppSession.pm:1064 <500> *** Call to [open-ils.fielder.flattened_search.execute.atomic] failed for session [1345485018.767884163.96534353976], thread trace [1]:\nNo field by the name publish_fieldmapper in Fieldmapper! at /usr/local/share/perl/5.10.1/OpenILS/Utils/Fieldmapper.pm line 270.\n\n\n\n, referer: http://XXXXXXX/eg/conify/global/actor/search_filter_group Signed-off-by: Lebbeous Fogle-Weekley --- diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Flattener.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Flattener.pm index 8bc8eda3cc..c9672471a3 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Flattener.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Flattener.pm @@ -20,7 +20,7 @@ $Data::Dumper::Indent = 0; sub _fm_link_from_class { my ($class, $field) = @_; - return Fieldmapper->publish_fieldmapper->{$class}{links}{$field}; + return OpenILS::Application->publish_fieldmapper->{$class}{links}{$field}; } sub _flattened_search_single_flesh_wad { diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Trigger.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Trigger.pm index 2f2841616d..24488e8c0f 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Trigger.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Trigger.pm @@ -369,15 +369,15 @@ __PACKAGE__->register_method( sub _fm_hint_by_class { my $class = shift; - return Fieldmapper->publish_fieldmapper->{$class}->{hint}; + return OpenILS::Application->publish_fieldmapper->{$class}->{hint}; } sub _fm_class_by_hint { my $hint = shift; my ($class) = grep { - Fieldmapper->publish_fieldmapper->{$_}->{hint} eq $hint - } keys %{ Fieldmapper->publish_fieldmapper }; + OpenILS::Application->publish_fieldmapper->{$_}->{hint} eq $hint + } keys %{ OpenILS::Application->publish_fieldmapper }; return $class; } diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Trigger/Event.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Trigger/Event.pm index 1aca73e0a0..0f52b732cc 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Trigger/Event.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Trigger/Event.pm @@ -484,8 +484,8 @@ sub _fm_class_by_hint { my $hint = shift; my ($class) = grep { - Fieldmapper->publish_fieldmapper->{$_}->{hint} eq $hint - } keys %{ Fieldmapper->publish_fieldmapper }; + OpenILS::Application->publish_fieldmapper->{$_}->{hint} eq $hint + } keys %{ OpenILS::Application->publish_fieldmapper }; return $class; } @@ -530,15 +530,15 @@ sub _object_by_path { my $step = shift(@$path); - my $fhint = Fieldmapper->publish_fieldmapper->{$context->class_name}{links}{$step}{class}; + my $fhint = OpenILS::Application->publish_fieldmapper->{$context->class_name}{links}{$step}{class}; my $fclass = $self->_fm_class_by_hint( $fhint ); OpenSRF::EX::ERROR->throw( "$step is not a field on ".$context->class_name." Please repair the environment.") unless $fhint; - my $ffield = Fieldmapper->publish_fieldmapper->{$context->class_name}{links}{$step}{key}; - my $rtype = Fieldmapper->publish_fieldmapper->{$context->class_name}{links}{$step}{reltype}; + my $ffield = OpenILS::Application->publish_fieldmapper->{$context->class_name}{links}{$step}{key}; + my $rtype = OpenILS::Application->publish_fieldmapper->{$context->class_name}{links}{$step}{reltype}; my $meth = 'retrieve_'; my $multi = 0; @@ -572,7 +572,7 @@ sub _object_by_path { $obj = $_object_by_path_cache{$def_id}{$str_path}{$step}{$ffield}{$lval} || ( (grep /cstore/, @{ - Fieldmapper->publish_fieldmapper->{$fclass}{controller} + OpenILS::Application->publish_fieldmapper->{$fclass}{controller} }) ? $ed : ($red ||= new_rstore_editor(xact=>1)) )->$meth( ($multi) ? { $ffield => $lval } : $lval);