Bugzilla – Attachment 74915 Details for
Bug 20676
svc/barcode should allow barcode to be printed without text
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 20676: svc/barcode should allow barcode to be printed without text
Bug-20676-svcbarcode-should-allow-barcode-to-be-pr.patch (text/plain), 1.70 KB, created by
Barton Chittenden
on 2018-04-27 22:20:24 UTC
(
hide
)
Description:
Bug 20676: svc/barcode should allow barcode to be printed without text
Filename:
MIME Type:
Creator:
Barton Chittenden
Created:
2018-04-27 22:20:24 UTC
Size:
1.70 KB
patch
obsolete
>From 3ae0ddd7180c033a71c84a458d4e8b849506ab4d Mon Sep 17 00:00:00 2001 >From: Barton Chittenden <barton@bywatersolutions.com> >Date: Fri, 27 Apr 2018 22:09:29 +0000 >Subject: [PATCH] Bug 20676: svc/barcode should allow barcode to be printed > without text > >Test plan: > >1) Point web browser to > <staff url>/cgi-bin/koha/svc/barcode?barcode=*12345*&nobarcode > > This will display a png image of the barcode 12345 with the > text 12345 printed below the scannable barcode. > >2) Apply patch >3) Refresh the browser. The human readable text no longer appears. >--- > svc/barcode | 15 ++++++++++++++- > 1 file changed, 14 insertions(+), 1 deletion(-) > >diff --git a/svc/barcode b/svc/barcode >index 80b1504..577f397 100755 >--- a/svc/barcode >+++ b/svc/barcode >@@ -58,6 +58,13 @@ COOP2of5 > > If ommited,it defaults to Code39. > >+=item I<notext> >+ >+Unless I<notext> is specified in the parameter list, the >+value of the barcode will included as text below the >+scannable barcode. >+ >+ > =back > > =head2 EXAMPLES >@@ -72,6 +79,11 @@ Returns a Code39 barcode image for barcode 123456789 > > Returns a UPCE barcode image for barcode 123456789 > >+=item /cgi-bin/koha/svc/barcode?barcode=123456789¬ext >+ >+Returns a Code39 barcode image for barcode 123456789 >+which does not include the human readable text '123456789' >+below the scannable barcode. > =cut > > my $input = new CGI; >@@ -86,10 +98,11 @@ binmode(STDOUT); > > my $type = $input->param('type') || 'Code39'; > my $barcode = $input->param('barcode'); >+my $nobarcode = $input->param('nobarcode') ? 1 : 0; > my $image; > > eval { >- $image = GD::Barcode->new( $type, $barcode )->plot()->png(); >+ $image = GD::Barcode->new( $type, $barcode )->plot( nobarcode => $nobarcode )->png(); > }; > > if ( $@ ) { >-- >2.1.4
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 20676
:
74915
|
74939
|
74940
|
74942
|
75600