From bc9618c6695612b20eb0e21ace49608d16800f05 Mon Sep 17 00:00:00 2001 From: Nahuel ANGELINETTI Date: Fri, 31 Jul 2009 16:04:01 +0200 Subject: [PATCH] (bug #3458) fix die and unimarc 700-4 plugin This patch, fix the unimarc 700-4 plugin, adding the plugin_parameters() function. And add an eval, that permit to have error in plugin, but don't die the editor. Signed-off-by: Galen Charlton --- authorities/authorities.pl | 5 ++++- cataloguing/value_builder/unimarc_field_700-4.pl | 5 +++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/authorities/authorities.pl b/authorities/authorities.pl index 2e9f2da059..aacb7f6076 100755 --- a/authorities/authorities.pl +++ b/authorities/authorities.pl @@ -202,7 +202,10 @@ sub create_input { } my $plugin = $cgidir . "/" . $tagslib->{$tag}->{$subfield}->{'value_builder'}; do $plugin || die "Plugin Failed: ".$plugin; - my $extended_param = plugin_parameters( $dbh, $rec, $tagslib, $subfield_data{id}, $tabloop ); + my $extended_param; + eval{ + $extended_param = plugin_parameters( $dbh, $rec, $tagslib, $subfield_data{id}, $tabloop ); + }; my ( $function_name, $javascript ) = plugin_javascript( $dbh, $rec, $tagslib, $subfield_data{id}, $tabloop ); # my ( $function_name, $javascript,$extended_param ); diff --git a/cataloguing/value_builder/unimarc_field_700-4.pl b/cataloguing/value_builder/unimarc_field_700-4.pl index 714c5b3951..a2f3f5116b 100755 --- a/cataloguing/value_builder/unimarc_field_700-4.pl +++ b/cataloguing/value_builder/unimarc_field_700-4.pl @@ -43,6 +43,11 @@ This plug-in deals with unimarc field 700-4 ( =cut +sub plugin_parameters { +my ($dbh,$record,$tagslib,$i,$tabloop) = @_; +return ""; +} + sub plugin_javascript { my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_; my $function_name= $field_number; -- 2.39.5