Bugzilla – Attachment 23485 Details for
Bug 8018
New subfields have a default max length of zero
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 8018: maxlenght should default to 9999 for subfields
Bug-8018-maxlenght-should-default-to-9999-for-subf.patch (text/plain), 1.36 KB, created by
Tomás Cohen Arazi (tcohen)
on 2013-12-12 15:39:36 UTC
(
hide
)
Description:
Bug 8018: maxlenght should default to 9999 for subfields
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2013-12-12 15:39:36 UTC
Size:
1.36 KB
patch
obsolete
>From 584ee292cb797c1bf0dfc73d55a97929d282e002 Mon Sep 17 00:00:00 2001 >From: Pablo Bianchi <pablo.bianchi@gmail.com> >Date: Wed, 11 Dec 2013 15:54:54 -0300 >Subject: [PATCH] Bug 8018: maxlenght should default to 9999 for subfields > >The default value for the marc_subfield_structure.maxlenght is 9999 >in the DB. Currently the template passes an empty value which is casted to >0 by the CGI. > >This simple patch validates the input and converts to the default (9999) >if not defined or 0. > >Another approach could be changing the 9999 default and/or treating 0 as >'no-limit'. > >PabloAB > >Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com> >Works by defaulting 0 or "" to 9999. >--- > admin/marc_subfields_structure.pl | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/admin/marc_subfields_structure.pl b/admin/marc_subfields_structure.pl >index 615fbcf..d347012 100755 >--- a/admin/marc_subfields_structure.pl >+++ b/admin/marc_subfields_structure.pl >@@ -425,7 +425,7 @@ elsif ( $op eq 'add_validate' ) { > my $isurl = $input->param("isurl$i") ? 1 : 0; > my $link = $link[$i]; > my $defaultvalue = $defaultvalue[$i]; >- my $maxlength = $maxlength[$i]; >+ my $maxlength = $maxlength[$i] ? $maxlength[$i] : 9999; > > if (defined($liblibrarian) && $liblibrarian ne "") { > unless ( C4::Context->config('demo') eq 1 ) { >-- >1.8.3.2
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 8018
:
23483
|
23485
|
23487
|
23488
|
23758
|
23759
|
23789
|
23790
|
23791