From 24a3943bebab624435d2fa34408f4208cc2b04c4 Mon Sep 17 00:00:00 2001 From: Ian Walls Date: Tue, 30 Nov 2010 11:27:01 -0500 Subject: [PATCH] Bug 5457: gather_print_notices.pl requires explicit stylesheet Content-Type: text/plain; charset="utf-8" Adds a conditional around the opening and closing of STYLESHEET, testing on whether the $stylesheet variable is set or not. Signed-off-by: Nicole Engard --- misc/cronjobs/gather_print_notices.pl | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-) diff --git a/misc/cronjobs/gather_print_notices.pl b/misc/cronjobs/gather_print_notices.pl index 5e0c863..03b65b4 100755 --- a/misc/cronjobs/gather_print_notices.pl +++ b/misc/cronjobs/gather_print_notices.pl @@ -73,9 +73,11 @@ open OUTPUT, '>', File::Spec->catdir( $output_directory, "holdnotices-" . $today my $template = C4::Output::gettemplate( 'batch/print-notices.tmpl', 'intranet', new CGI ); my $stylesheet_contents = ''; -open STYLESHEET, '<', $stylesheet; -while ( ) { $stylesheet_contents .= $_ } -close STYLESHEET; +if ($stylesheet) { + open STYLESHEET, '<', $stylesheet; + while ( ) { $stylesheet_contents .= $_ } + close STYLESHEET; +} $template->param( stylesheet => $stylesheet_contents, -- 1.5.6.5