Bugzilla – Attachment 24106 Details for
Bug 11513
Warnings in Patron categories
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 11513 - Warnings in Patron categories
Bug-11513---Warnings-in-Patron-categories.patch (text/plain), 2.39 KB, created by
Mark Tompsett
on 2014-01-10 05:13:56 UTC
(
hide
)
Description:
Bug 11513 - Warnings in Patron categories
Filename:
MIME Type:
Creator:
Mark Tompsett
Created:
2014-01-10 05:13:56 UTC
Size:
2.39 KB
patch
obsolete
>From 4a8f85279807950d81f38133ca3aee45fb1a3eb4 Mon Sep 17 00:00:00 2001 >From: Mark Tompsett <mtompset@hotmail.com> >Date: Fri, 10 Jan 2014 00:06:21 -0500 >Subject: [PATCH] Bug 11513 - Warnings in Patron categories > >TEST PLAN >--------- >1) Log in to staff client >2) Click 'Administration' >3) Click 'Patron categories' >4) Review error log, several warnings. >5) Apply patch >6) Refresh page >7) Review error log, no warnings. >--- > admin/categorie.pl | 9 +++++++-- > 1 file changed, 7 insertions(+), 2 deletions(-) > >diff --git a/admin/categorie.pl b/admin/categorie.pl >index 952ef7a..d820414 100755 >--- a/admin/categorie.pl >+++ b/admin/categorie.pl >@@ -49,8 +49,10 @@ use C4::Form::MessagingPreferences; > sub StringSearch { > my ($searchstring,$type)=@_; > my $dbh = C4::Context->dbh; >+ $searchstring //= ''; > $searchstring=~ s/\'/\\\'/g; > my @data=split(' ',$searchstring); >+ push @data,q{} if $#data==-1; > my $count=@data; > my $sth=$dbh->prepare("Select * from categories where (description like ?) order by category_type,description,categorycode"); > $sth->execute("$data[0]%"); >@@ -67,7 +69,7 @@ my $input = new CGI; > my $searchfield=$input->param('description'); > my $script_name="/cgi-bin/koha/admin/categorie.pl"; > my $categorycode=$input->param('categorycode'); >-my $op = $input->param('op'); >+my $op = $input->param('op') // ''; > > my ($template, $loggedinuser, $cookie) > = get_template_and_user({template_name => "admin/categorie.tmpl", >@@ -240,11 +242,14 @@ if ($op eq 'add_form') { > while ( my $branch = $sth->fetchrow_hashref ) { > push @selected_branches, $branch; > } >+ my $enrolmentperioddate = $results->[$i]{'enrolmentperioddate'}; >+ $enrolmentperioddate = undef if $enrolmentperioddate eq '0000-00-00'; >+ $enrolmentperioddate = C4::Dates::format_date($enrolmentperioddate); > my %row = ( > categorycode => $results->[$i]{'categorycode'}, > description => $results->[$i]{'description'}, > enrolmentperiod => $results->[$i]{'enrolmentperiod'}, >- enrolmentperioddate => C4::Dates::format_date($results->[$i]{'enrolmentperioddate'}), >+ enrolmentperioddate => $enrolmentperioddate, > upperagelimit => $results->[$i]{'upperagelimit'}, > dateofbirthrequired => $results->[$i]{'dateofbirthrequired'}, > enrolmentfee => sprintf("%.2f",$results->[$i]{'enrolmentfee'}), >-- >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 11513
:
24106
|
24107
|
24164
|
24169
|
24475
|
24476
|
24477
|
24478
|
24479
|
24480
|
24481
|
24865
|
24931