Bugzilla – Attachment 74940 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), 2.04 KB, created by
Frédéric Demians
on 2018-04-30 16:47:06 UTC
(
hide
)
Description:
Bug 20676: svc/barcode should allow barcode to be printed without text
Filename:
MIME Type:
Creator:
Frédéric Demians
Created:
2018-04-30 16:47:06 UTC
Size:
2.04 KB
patch
obsolete
>From 7b3d60957b5a5a9840b670fc7f0a40d897164fa0 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 >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >Test plan: > >1) Point web browser to > <staff url>/cgi-bin/koha/svc/barcode?barcode=*12345*¬ext=1 > > 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. > >Signed-off-by: Frédéric Demians <f.demians@tamil.fr> >--- > svc/barcode | 20 +++++++++++++++++++- > 1 file changed, 19 insertions(+), 1 deletion(-) > >diff --git a/svc/barcode b/svc/barcode >index 80b1504..2ecc6ff 100755 >--- a/svc/barcode >+++ b/svc/barcode >@@ -58,6 +58,13 @@ COOP2of5 > > If ommited,it defaults to Code39. > >+=item I<notext> >+ >+Unless I<notext=1> 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=1 >+ >+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,16 @@ binmode(STDOUT); > > my $type = $input->param('type') || 'Code39'; > my $barcode = $input->param('barcode'); >+my $notext = $input->param('notext') ? 1 : 0; > my $image; > >+warn("Barcode type: '$type'"); >+warn("Barcode content: '$barcode'"); >+warn("Barcode notext: '$notext'"); >+warn("Barcode perl: 'GD::Barcode->new( $type, $barcode )->plot( NoText => $notext )->png();'"); >+ > eval { >- $image = GD::Barcode->new( $type, $barcode )->plot()->png(); >+ $image = GD::Barcode->new( $type, $barcode )->plot( NoText => $notext )->png(); > }; > > if ( $@ ) { >-- >2.7.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