Bugzilla – Attachment 7477 Details for
Bug 6842
Branch transfer limits broken
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[SIGNED-OFF] followup patch : assigns a problem of deleted information when editing an other branch
0001-SIGNED-OFF-Bug-6842-FU-library-transfer-limits-edits.patch (text/plain), 1.81 KB, created by
Owen Leonard
on 2012-02-07 15:31:36 UTC
(
hide
)
Description:
[SIGNED-OFF] followup patch : assigns a problem of deleted information when editing an other branch
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2012-02-07 15:31:36 UTC
Size:
1.81 KB
patch
obsolete
>From 3372361c9c94822b6a1960bbc0f3166639e73aa2 Mon Sep 17 00:00:00 2001 >From: Henri-Damien LAURENT <henridamien.laurent@biblibre.com> >Date: Thu, 22 Dec 2011 06:23:35 +0100 >Subject: [PATCH] [SIGNED-OFF] Bug 6842 FU : library transfer limits edits not stored >Content-Type: text/plain; charset="utf-8" > >Followup : >Changes the DeleteBranchTransferLimits signature : >one now needs to delete only the limits for ONE branch > >Signed-off-by: Owen Leonard <oleonard@myacpl.org> >--- > C4/Circulation.pm | 11 +++++++---- > admin/branch_transfer_limits.pl | 3 ++- > 2 files changed, 9 insertions(+), 5 deletions(-) > >diff --git a/C4/Circulation.pm b/C4/Circulation.pm >index e68db64..5894154 100644 >--- a/C4/Circulation.pm >+++ b/C4/Circulation.pm >@@ -2974,14 +2974,17 @@ sub CreateBranchTransferLimit { > > =head2 DeleteBranchTransferLimits > >- DeleteBranchTransferLimits(); >+DeleteBranchTransferLimits($frombranch); >+ >+Deletes all the branch transfer limits for one branch > > =cut > > sub DeleteBranchTransferLimits { >- my $dbh = C4::Context->dbh; >- my $sth = $dbh->prepare("TRUNCATE TABLE branch_transfer_limits"); >- $sth->execute(); >+ my $branch = shift; >+ my $dbh = C4::Context->dbh; >+ my $sth = $dbh->prepare("DELETE FROM branch_transfer_limits WHERE fromBranch = ?"); >+ $sth->execute($branch); > } > > sub ReturnLostItem{ >diff --git a/admin/branch_transfer_limits.pl b/admin/branch_transfer_limits.pl >index 8c6f42e..e7422a6 100755 >--- a/admin/branch_transfer_limits.pl >+++ b/admin/branch_transfer_limits.pl >@@ -93,7 +93,8 @@ while ( my $row = $sth->fetchrow_hashref ) { > > ## If Form Data Passed, Update the Database > if ( $input->param('updateLimits') ) { >- DeleteBranchTransferLimits(); >+ DeleteBranchTransferLimits($branchcode); >+ > > foreach my $code ( @codes ) { > foreach my $toBranch ( @branchcodes ) { >-- >1.7.3 >
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 6842
:
5438
|
5471
|
6923
|
6925
|
6944
|
6960
| 7477 |
7484