From 81516e16c0ee8ea532a6982ca93973a9ca82402a Mon Sep 17 00:00:00 2001 From: Joe Atzberger Date: Tue, 4 Dec 2007 17:40:52 -0600 Subject: [PATCH] authorities subdir - Dates.pm integration and warnings fixes. Signed-off-by: Chris Cormack Signed-off-by: Joshua Ferraro --- authorities/authorities.pl | 2 +- authorities/detail-biblio-search.pl | 3 +-- authorities/detail.pl | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/authorities/authorities.pl b/authorities/authorities.pl index 7bd6e06178..db5498a35a 100755 --- a/authorities/authorities.pl +++ b/authorities/authorities.pl @@ -224,7 +224,7 @@ sub create_input { # opening plugin. Just check wether we are on a developper computer on a production one # (the cgidir differs) my $cgidir = C4::Context->intranetdir . "/cgi-bin/cataloguing/value_builder"; - unless ( opendir( DIR, "$cgidir" ) ) { + unless (-r $cgidir and -d $cgidir) { $cgidir = C4::Context->intranetdir . "/cataloguing/value_builder"; } my $plugin = $cgidir . "/" . $tagslib->{$tag}->{$subfield}->{'value_builder'}; diff --git a/authorities/detail-biblio-search.pl b/authorities/detail-biblio-search.pl index b421b805ff..07ba283e7f 100755 --- a/authorities/detail-biblio-search.pl +++ b/authorities/detail-biblio-search.pl @@ -77,8 +77,7 @@ my $tag; # loop through each tab 0 through 9 # for (my $tabloop = 0; $tabloop<=10;$tabloop++) { # loop through each tag - my @fields = $record->fields(); - my @loop_data =(); +my @fields = $record->fields(); foreach my $field (@fields) { my @subfields_data; # if tag <10, there's no subfield, use the "@" trick diff --git a/authorities/detail.pl b/authorities/detail.pl index 9a7a4954ae..2ed7f27230 100755 --- a/authorities/detail.pl +++ b/authorities/detail.pl @@ -236,7 +236,7 @@ sub create_input { # opening plugin. Just check wether we are on a developper computer on a production one # (the cgidir differs) my $cgidir = C4::Context->intranetdir . "/cgi-bin/cataloguing/value_builder"; - unless ( opendir( DIR, "$cgidir" ) ) { + unless (-r $cgidir and -d $cgidir) { $cgidir = C4::Context->intranetdir . "/cataloguing/value_builder"; } my $plugin = $cgidir . "/" . $tagslib->{$tag}->{$subfield}->{'value_builder'}; -- 2.11.0