Bugzilla – Attachment 11039 Details for
Bug 8482
labels creator fixes for plack
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 8482 - labels creator fixes for plack
Bug-8482---labels-creator-fixes-for-plack.patch (text/plain), 3.23 KB, created by
Dobrica Pavlinusic
on 2012-07-20 12:13:49 UTC
(
hide
)
Description:
Bug 8482 - labels creator fixes for plack
Filename:
MIME Type:
Creator:
Dobrica Pavlinusic
Created:
2012-07-20 12:13:49 UTC
Size:
3.23 KB
patch
obsolete
>From 291ca78d3e168655f1f6ca8c4f6d38ae6f7df324 Mon Sep 17 00:00:00 2001 >From: Dobrica Pavlinusic <dpavlin@rot13.org> >Date: Thu, 19 Jul 2012 19:12:13 +0200 >Subject: [PATCH] Bug 8482 - labels creator fixes for plack > >- remove all exit(1) and replace them with __END__ which benefits CGI >- insert correct =cut markers at end of POD (required for CGI::Compile > under plack to correctly parse source code and exeute it) >- scope variables with our which are used inside sub for plack >--- > labels/label-create-csv.pl | 5 ++--- > labels/label-create-pdf.pl | 6 +++--- > labels/label-create-xml.pl | 4 ++-- > 3 files changed, 7 insertions(+), 8 deletions(-) > >diff --git a/labels/label-create-csv.pl b/labels/label-create-csv.pl >index 1229c0a..1b0c02c 100755 >--- a/labels/label-create-csv.pl >+++ b/labels/label-create-csv.pl >@@ -72,7 +72,6 @@ else { > > my $csv = Text::CSV_XS->new(); > >-CSV_ITEMS: > foreach my $item (@$items) { > my $label = C4::Labels::Label->new( > batch_id => $batch_id, >@@ -85,11 +84,10 @@ foreach my $item (@$items) { > } > else { > warn sprintf('Text::CSV_XS->combine() returned the following error: %s', $csv->error_input); >- next CSV_ITEMS; > } > } > >-exit(1); >+__END__ > > =head1 NAME > >@@ -122,3 +120,4 @@ Fifth Floor, Boston, MA 02110-1301 USA. > Koha is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR > A PARTICULAR PURPOSE. See the GNU General Public License for more details. > >+=cut >diff --git a/labels/label-create-pdf.pl b/labels/label-create-pdf.pl >index 3001c14..3d7ff1f 100755 >--- a/labels/label-create-pdf.pl >+++ b/labels/label-create-pdf.pl >@@ -58,9 +58,9 @@ print $cgi->header( -type => 'application/pdf', > -attachment => "$pdf_file.pdf", > ); > >-my $pdf = C4::Creators::PDF->new(InitVars => 0); >+our $pdf = C4::Creators::PDF->new(InitVars => 0); > my $batch = C4::Labels::Batch->retrieve(batch_id => $batch_id); >-my $template = C4::Labels::Template->retrieve(template_id => $template_id, profile_id => 1); >+our $template = C4::Labels::Template->retrieve(template_id => $template_id, profile_id => 1); > my $layout = C4::Labels::Layout->retrieve(layout_id => $layout_id); > > sub _calc_next_label_pos { >@@ -205,7 +205,7 @@ foreach my $item (@{$items}) { > > $pdf->End(); > >-exit(1); >+__END__ > > =head1 NAME > >diff --git a/labels/label-create-xml.pl b/labels/label-create-xml.pl >index 6604dc4..5e62ef8 100755 >--- a/labels/label-create-xml.pl >+++ b/labels/label-create-xml.pl >@@ -74,7 +74,6 @@ my $xml_data = {'label' => []}; > > my $item_count = 0; > >-XML_ITEMS: > foreach my $item (@$items) { > push(@{$xml_data->{'label'}}, {'item_number' => $item->{'item_number'}}); > my $label = C4::Labels::Label->new( >@@ -98,7 +97,7 @@ my $xml_out = $xml->XMLout($xml_data); > #die "XML OUT:\n" . Dumper($xml_out); > print $xml_out; > >-exit(1); >+__END__ > > =head1 NAME > >@@ -132,3 +131,4 @@ Fifth Floor, Boston, MA 02110-1301 USA. > Koha is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR > A PARTICULAR PURPOSE. See the GNU General Public License for more details. > >+=cut >-- >1.7.2.5
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 8482
:
11039