Bugzilla – Attachment 9135 Details for
Bug 7937
Silence warns in OPAC error log (koha-opac-error_log)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[SIGNED OFF] Bug 7937: Fix warns on opac-userupdate.pl
SIGNED-OFF-Bug-7937-Fix-warns-on-opac-userupdatepl.patch (text/plain), 2.96 KB, created by
Chris Cormack
on 2012-04-12 09:18:14 UTC
(
hide
)
Description:
[SIGNED OFF] Bug 7937: Fix warns on opac-userupdate.pl
Filename:
MIME Type:
Creator:
Chris Cormack
Created:
2012-04-12 09:18:14 UTC
Size:
2.96 KB
patch
obsolete
>From a423f156ec5460c997e9382c9616a3abba8cf562 Mon Sep 17 00:00:00 2001 >From: Katrin Fischer <Katrin.Fischer.83@web.de> >Date: Tue, 10 Apr 2012 00:50:48 +0200 >Subject: [PATCH] [SIGNED OFF] Bug 7937: Fix warns on opac-userupdate.pl > >1) opac-userupdate.pl: Use of uninitialized value $updateemailaddress in >pattern match (m//) at /home/katrin/kohaclone/opac/opac-userupdate.pl line 61. > >Warn was created when branch has no email address. >The script falls back to KohaAdminEmailAddress first and shows an >error message in OPAC when there is no email address to be used. > >2) opac-userupdate.pl: Use of uninitialized value in concatenation (.) or >string at /home/katrin/kohaclone/koha-tmpl/opac-tmpl/prog/en/modules/opac-userupdate.tt >line 75. > >Warn was created when patron has no date of birth. > >Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> >--- > .../opac-tmpl/prog/en/modules/opac-userupdate.tt | 9 ++++++++- > opac/opac-userupdate.pl | 2 +- > 2 files changed, 9 insertions(+), 2 deletions(-) > >diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-userupdate.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-userupdate.tt >index b903e4d..826508a 100644 >--- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-userupdate.tt >+++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-userupdate.tt >@@ -70,7 +70,14 @@ > </fieldset> > <fieldset class="brief"> > <ol> >-<li><label for="dob">Date of birth: </label> <input id="dob" type="text" size="10" value="[% BORROWER_INF.dateofbirth | $KohaDates %]" name="dateofbirth" /></li> >+<li> >+ <label for="dob">Date of birth: </label> >+ [% IF ( BORROWER_INF.dateofbirth ) %] >+ <input id="dob" type="text" size="10" value="[% BORROWER_INF.dateofbirth | $KohaDates %]" name="dateofbirth" /> >+ [% ELSE %] >+ <input id="dob" type="text" size="10" value="" name="dateofbirth" /> >+ [% END %] >+</li> > <li><label for="sex">Gender: </label> <select name="sex" id="sex"><option></option> > [% IF ( BORROWER_INF.sex == 'F' ) %]<option value="F" selected="selected">Female</option>[% ELSE %]<option value="F">Female</option>[% END %] > [% IF ( BORROWER_INF.sex == 'M' ) %]<option value="M" selected="selected">Male</option>[% ELSE %]<option value="M">Male</option>[% END %] >diff --git a/opac/opac-userupdate.pl b/opac/opac-userupdate.pl >index b37d88c..1dfc87f 100755 >--- a/opac/opac-userupdate.pl >+++ b/opac/opac-userupdate.pl >@@ -57,7 +57,7 @@ my @fields = ( > 'surname','firstname','othernames','streetnumber','address','address2','city','state','zipcode','country','phone','mobile','fax','phonepro', 'emailaddress','emailpro','B_streetnumber','B_address','B_address2','B_city','B_state','B_zipcode','B_country','B_phone','B_email','dateofbirth','sex' > ); > my $update; >-my $updateemailaddress = $lib->{'branchemail'}; >+my $updateemailaddress = $lib->{'branchemail'} || ''; > $updateemailaddress = C4::Context->preference('KohaAdminEmailAddress') unless( $updateemailaddress =~ /\w+@\w+/); > if ( !$updateemailaddress || $updateemailaddress eq '' ) { > warn >-- >1.7.5.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 7937
:
9059
|
9060
|
9061
|
9063
|
9064
|
9065
|
9115
|
9134
| 9135 |
9141
|
9142
|
9143