Bugzilla – Attachment 20974 Details for
Bug 10838
Silence warnings in members/member.pl
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[PASSED QA] Bug 10838 : Silence warns in members/member.pl
PASSED-QA-Bug-10838--Silence-warns-in-membersmembe.patch (text/plain), 3.24 KB, created by
Katrin Fischer
on 2013-09-10 20:25:30 UTC
(
hide
)
Description:
[PASSED QA] Bug 10838 : Silence warns in members/member.pl
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2013-09-10 20:25:30 UTC
Size:
3.24 KB
patch
obsolete
>From 78b9c556f09f181a32527439fa8d1440dc0a4b8a Mon Sep 17 00:00:00 2001 >From: Chris Cormack <chris@bigballofwax.co.nz> >Date: Sat, 7 Sep 2013 15:30:56 +1200 >Subject: [PATCH] [PASSED QA] Bug 10838 : Silence warns in members/member.pl > >To test > >1/ Uncomment the use warnings line >2/ Search for a patron, notice all the warnings >3/ Browse for a patron, notice warnings >4/ Apply patch >5/ Repeat 3 and 4 >6/ Notice no errors and the search still works > >This depends on the patch for Bug 10835 > >Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> >Signed-off-by: Owen Leonard <oleonard@myacpl.org> >Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> >Passes all tests, no regressions found. >--- > members/member.pl | 19 +++++++++---------- > 1 file changed, 9 insertions(+), 10 deletions(-) > >diff --git a/members/member.pl b/members/member.pl >index f3d5847..59b56e3 100755 >--- a/members/member.pl >+++ b/members/member.pl >@@ -23,8 +23,7 @@ > # with Koha; if not, write to the Free Software Foundation, Inc., > # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. > >-use strict; >-#use warnings; FIXME - Bug 2505 >+use Modern::Perl; > use C4::Auth; > use C4::Output; > use CGI; >@@ -35,9 +34,9 @@ use Koha::DateUtils; > use File::Basename; > > my $input = new CGI; >-my $quicksearch = $input->param('quicksearch'); >-my $startfrom = $input->param('startfrom')||1; >-my $resultsperpage = $input->param('resultsperpage')||C4::Context->preference("PatronsPerPage")||20; >+my $quicksearch = $input->param('quicksearch') || ''; >+my $startfrom = $input->param('startfrom') || 1; >+my $resultsperpage = $input->param('resultsperpage') || C4::Context->preference("PatronsPerPage") || 20; > > my ($template, $loggedinuser, $cookie) > = get_template_and_user({template_name => "members/member.tmpl", >@@ -60,7 +59,7 @@ my @branchloop; > > foreach (sort { $branches->{$a}->{branchname} cmp $branches->{$b}->{branchname} } keys %$branches) { > my $selected; >- $selected = 1 if $branches->{$_}->{branchcode} eq $$patron{branchcode}; >+ $selected = 1 if $patron->{branchcode} && $branches->{$_}->{branchcode} eq $patron->{branchcode}; > my %row = ( value => $_, > selected => $selected, > branchname => $branches->{$_}->{branchname}, >@@ -85,8 +84,8 @@ if ($AddPatronLists=~/code/){ > $categories[0]->{'first'}=1; > } > >-my $member=$input->param('member'); >-my $orderbyparams=$input->param('orderby'); >+my $member=$input->param('member') || ''; >+my $orderbyparams=$input->param('orderby') || ''; > my @orderby; > if ($orderbyparams){ > my @orderbyelt=split(/,/,$orderbyparams); >@@ -104,7 +103,7 @@ my $to = $from + $resultsperpage; > > my ($count,$results); > if ($member || keys %$patron) { >- my $searchfields = $input->param('searchfields'); >+ my $searchfields = $input->param('searchfields') || ''; > my @searchfields = $searchfields ? split( ',', $searchfields ) : ( "firstname", "surname", "othernames", "cardnumber", "userid", "email" ); > > if ( $searchfields eq "dateofbirth" ) { >@@ -139,7 +138,7 @@ my $index=$from; > foreach my $borrower(@$results[$from..$to-1]){ > #find out stats > my ($od,$issue,$fines)=GetMemberIssuesAndFines($$borrower{'borrowernumber'}); >- >+ $fines ||= 0; > $$borrower{'dateexpiry'}= C4::Dates->new($$borrower{'dateexpiry'},'iso')->output('syspref'); > > my %row = ( >-- >1.7.9.5
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 10838
:
20841
|
20912
| 20974