Bugzilla – Attachment 77591 Details for
Bug 19325
Enable padding of printed barcodes
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 19325: (QA follow-up) Remove a syspref, change the backend accordingly
Bug-19325-QA-follow-up-Remove-a-syspref-change-the.patch (text/plain), 3.66 KB, created by
Charles Farmer
on 2018-08-08 19:15:58 UTC
(
hide
)
Description:
Bug 19325: (QA follow-up) Remove a syspref, change the backend accordingly
Filename:
MIME Type:
Creator:
Charles Farmer
Created:
2018-08-08 19:15:58 UTC
Size:
3.66 KB
patch
obsolete
>From 16a35155af3b43b55fd53907e5c816017034aee3 Mon Sep 17 00:00:00 2001 >From: Charles Farmer <charles.farmer@inLibro.com> >Date: Wed, 8 Aug 2018 15:15:35 -0400 >Subject: [PATCH] Bug 19325: (QA follow-up) Remove a syspref, change the > backend accordingly > >--- > C4/Labels/Label.pm | 3 +-- > .../data/mysql/atomicupdate/Bug19325-BarcodePadding.syspref.sql | 5 ++--- > .../intranet-tmpl/prog/en/modules/admin/preferences/tools.pref | 8 ++------ > 3 files changed, 5 insertions(+), 11 deletions(-) > >diff --git a/C4/Labels/Label.pm b/C4/Labels/Label.pm >index 3738d2a..462731b 100644 >--- a/C4/Labels/Label.pm >+++ b/C4/Labels/Label.pm >@@ -503,14 +503,13 @@ sub barcode { > $params{'barcode_data'} = _get_label_item($self->{'item_number'}, 1) if !$params{'barcode_data'}; > $params{'barcode_type'} = $self->{'barcode_type'} if !$params{'barcode_type'}; > >- my $enableBarcodePadding = C4::Context->preference("BarcodePaddingEnable"); > my $paddingCharacter = C4::Context->preference("BarcodePaddingCharacter") || 0; > my $paddingLength = C4::Context->preference("BarcodePaddingLength") || 0; > > if (length($paddingCharacter) > 1) { > $paddingCharacter = substr $paddingCharacter, 0, 1; > } >- if ($enableBarcodePadding and length($params{'barcode_data'}) < $paddingLength) { >+ if (length($params{'barcode_data'}) < $paddingLength) { > $params{'barcode_data'} = ($paddingCharacter x ($paddingLength - length($params{'barcode_data'}))) . $params{'barcode_data'}; > } > >diff --git a/installer/data/mysql/atomicupdate/Bug19325-BarcodePadding.syspref.sql b/installer/data/mysql/atomicupdate/Bug19325-BarcodePadding.syspref.sql >index bb342a0..d058ce8 100644 >--- a/installer/data/mysql/atomicupdate/Bug19325-BarcodePadding.syspref.sql >+++ b/installer/data/mysql/atomicupdate/Bug19325-BarcodePadding.syspref.sql >@@ -1,4 +1,3 @@ > INSERT IGNORE INTO systempreferences (variable, value, explanation, options, type) VALUES >-('BarcodePaddingEnable','0','Enables padding the barcode when printing to PDF',NULL,'YesNo'), >-('BarcodePaddingLength','0','The total length of the padded barcode',NULL,'Integer'), >-('BarcodePaddingCharacter','0','The character to use when padding. Only string[0] is used.',NULL,'string'); >\ No newline at end of file >+('BarcodePaddingLength','0','The total length of the padded barcode. Padding is disabled when this value equals 0.',NULL,'Integer'), >+('BarcodePaddingCharacter','0','The character to use when padding. Only string[0] is used.',NULL,'string'); >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/tools.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/tools.pref >index 97219dc..f36443b 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/tools.pref >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/tools.pref >@@ -40,14 +40,10 @@ Tools: > - reports on the Saved Reports page. > Labels: > - >- - pref: BarcodePaddingEnable >- choices: >- yes: "Enable" >- no: "Disable" >- - "padding the length of printed barcodes up to length" >+ - "Pads the length of printed barcodes up to a width of" > - pref: BarcodePaddingLength > class: integer > - " with the character " > - pref: BarcodePaddingCharacter > class: integer >- - " This has no effect if the barcode is longer than length. Length and character default to 0 if fields are empty." >+ - "<br/>Length and character default to 0 if fields are empty. This preference has no effect if the original barcode is longer than BarcodePaddingLength." >-- >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 19325
:
67149
|
67150
|
68308
| 77591