From f578ac958097430bb0338aa73fde428bd829b135 Mon Sep 17 00:00:00 2001 From: erickson Date: Wed, 27 Jul 2005 21:46:04 +0000 Subject: [PATCH] checking in... see diffs git-svn-id: svn://svn.open-ils.org/ILS/trunk@1559 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- .../src/perlmods/OpenILS/Application/Cat.pm | 29 +++++++++---------- Open-ILS/src/templates/marc/book.xml | 2 +- OpenSRF/bin/opensrf_ctl | 4 +-- 3 files changed, 17 insertions(+), 18 deletions(-) diff --git a/Open-ILS/src/perlmods/OpenILS/Application/Cat.pm b/Open-ILS/src/perlmods/OpenILS/Application/Cat.pm index c11796c2ff..7ed7bfdf36 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/Cat.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/Cat.pm @@ -33,31 +33,30 @@ __PACKAGE__->register_method( sub retrieve_marc_template { my( $self, $client, $type ) = @_; + + return $marctemplates{$type} if defined($marctemplates{$type}); + my $xml = _load_marc_template($type); + my $nodes = OpenILS::Utils::FlatXML->new()->xml_to_nodeset( $xml ); - return $utils->nodeset2tree( $nodes->nodeset ); + $marctemplates{$type} = $utils->nodeset2tree( $nodes->nodeset ); + return $marctemplates{$type}; } sub _load_marc_template { my $type = shift; - if(!defined( $marctemplates{$type} )) { - if(!$conf) { $conf = OpenSRF::Utils::SettingsClient->new; } + if(!$conf) { $conf = OpenSRF::Utils::SettingsClient->new; } - my $template = $conf->config_value( - "apps", "open-ils.cat","app_settings", "marctemplates", $type ); - warn "Opening template file $template\n"; + my $template = $conf->config_value( + "apps", "open-ils.cat","app_settings", "marctemplates", $type ); + warn "Opening template file $template\n"; - open( F, $template ); - my @xml = ; - close(F); - $marctemplates{$type} = join('', @xml); + open( F, $template ); + my @xml = ; + close(F); + return join('', @xml); - } - - warn "Loaded MARC template XML:\n" . $marctemplates{$type} . "\n"; - - return $marctemplates{$type}; } diff --git a/Open-ILS/src/templates/marc/book.xml b/Open-ILS/src/templates/marc/book.xml index 40647812f3..a1cd172b2d 100644 --- a/Open-ILS/src/templates/marc/book.xml +++ b/Open-ILS/src/templates/marc/book.xml @@ -1,2 +1,2 @@ -00881nam a2200193 4500 19970610140737.0 , p. : +00881nam a2200193 4500 19970610140737.0 , p. : diff --git a/OpenSRF/bin/opensrf_ctl b/OpenSRF/bin/opensrf_ctl index 39a45b85ed..5449094525 100755 --- a/OpenSRF/bin/opensrf_ctl +++ b/OpenSRF/bin/opensrf_ctl @@ -32,7 +32,7 @@ function startSystem { "stop") PID=$(ps ax | grep "[0-9] System$" | awk '{print $1}'); - if [ -z $PID ]; then + if [ -z "$PID" ]; then echo "OpenSRF System is not running"; exit; fi @@ -43,7 +43,7 @@ function startSystem { "status") PID=$(ps ax | grep "[0-9] System$" | awk '{print $1}'); - if [ -z $PID ]; then + if [ -z "$PID" ]; then echo "OpenSRF System is not running"; exit 0; fi -- 2.43.2