Bugzilla – Attachment 6757 Details for
Bug 7157
Improve the j2a.pl cronjob
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 7157 - followup - error catching for nonexistent categories.
Bug-7157---followup---error-catching-for-nonexiste.patch (text/plain), 1.19 KB, created by
Liz Rea
on 2011-12-13 17:32:06 UTC
(
hide
)
Description:
Bug 7157 - followup - error catching for nonexistent categories.
Filename:
MIME Type:
Creator:
Liz Rea
Created:
2011-12-13 17:32:06 UTC
Size:
1.19 KB
patch
obsolete
>From cd8802b7091c94a88098f64506af261b4d284162 Mon Sep 17 00:00:00 2001 >From: Liz Rea <wizzyrea@gmail.com> >Date: Tue, 13 Dec 2011 11:26:48 -0600 >Subject: [PATCH] Bug 7157 - followup - error catching for nonexistent categories. >Content-Type: text/plain; charset="utf-8" > >This applies on top of the original patch - may not be the best implementation ever, suggestions are welcome. >--- > misc/cronjobs/j2a.pl | 10 +++++++++- > 1 files changed, 9 insertions(+), 1 deletions(-) > >diff --git a/misc/cronjobs/j2a.pl b/misc/cronjobs/j2a.pl >index b445b10..c0db179 100644 >--- a/misc/cronjobs/j2a.pl >+++ b/misc/cronjobs/j2a.pl >@@ -142,7 +142,15 @@ $sth->execute( $fromcat ) > my $agelimit = $sth->fetchrow_array(); > if ( not $agelimit ) { > >- die "No patron category with that category code. Please try again. \n"; >+ die "No patron category $fromcat. Please try again. \n"; >+} >+$query=qq|SELECT categorycode from categories where categorycode=?|; >+$sth=$dbh->prepare( $query ); >+$sth->execute( $tocat ) >+ or die "Couldn't execute statement: " . $sth->errstr; >+my $tocatage = $sth->fetchrow_array(); >+if ( not $tocatage ){ >+ die "No patron category $tocat. Please try again. \n"; > } > $sth->finish( ); > $year -=$agelimit; >-- >1.7.2.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 7157
:
6209
|
6250
|
6723
|
6724
|
6757
|
7004
|
7005
|
7131
|
7132
|
7137
|
7201