Bugzilla – Attachment 2757 Details for
Bug 5004
Do not block deletion of cities when instances exist in borrowers table
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Proposed fix for roadtype.pl
0001-Another-bug-5004-fix-this-time-for-road-types.patch (text/plain), 1.32 KB, created by
Owen Leonard
on 2010-11-15 15:16:43 UTC
(
hide
)
Description:
Proposed fix for roadtype.pl
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2010-11-15 15:16:43 UTC
Size:
1.32 KB
patch
obsolete
>From e85dcb22da5dd7f08649fe27f1038c3d07b07284 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Mon, 15 Nov 2010 10:12:37 -0500 >Subject: [PATCH] Another bug 5004 fix, this time for road types > >The road types interface didn't block deletion of road >types in use, but the script included the same queries >that cities.pl did, as if it intended to. >--- > admin/roadtype.pl | 8 -------- > 1 files changed, 0 insertions(+), 8 deletions(-) > >diff --git a/admin/roadtype.pl b/admin/roadtype.pl >index 544d488..a756594 100755 >--- a/admin/roadtype.pl >+++ b/admin/roadtype.pl >@@ -98,18 +98,10 @@ if ($op eq 'add_form') { > } elsif ($op eq 'delete_confirm') { > $template->param(delete_confirm => 1); > my $dbh = C4::Context->dbh; >- my $sth=$dbh->prepare("select count(*) as total from borrowers,roadtype where borrowers.streettype=roadtype.road_type and roadtypeid=?"); >- $sth->execute($roadtypeid); >- my $total = $sth->fetchrow_hashref; >- $sth->finish; >- $template->param(total => $total->{'total'}); > my $sth2=$dbh->prepare("select roadtypeid,road_type from roadtype where roadtypeid=?"); > $sth2->execute($roadtypeid); > my $data=$sth2->fetchrow_hashref; > $sth2->finish; >- if ($total->{'total'} >0) { >- $template->param(totalgtzero => 1); >- } > > $template->param( > road_type => ( $data->{'road_type'}), >-- >1.7.1 >
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 5004
:
2527
| 2757