[Koha-patches] [PATCH] [SIGNED-OFF] Bug 6351: Unable to delete branch-specific circulation rule

Katrin Fischer Katrin.Fischer.83 at web.de
Tue May 17 19:09:25 CEST 2011


From: D Ruth Bavousett <ruth at bywatersolutions.com>

The URL on the page did not have a branchcode, so the delete failed silently, and
returned the user to the "All" rules page.  Turns out, the array for the rules was
not being populated with the branchcode!

Signed-off-by: Katrin Fischer <Katrin.Fischer.83 at web.de>
---
 admin/smart-rules.pl |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/admin/smart-rules.pl b/admin/smart-rules.pl
index 3c77f93..5ba92d8 100755
--- a/admin/smart-rules.pl
+++ b/admin/smart-rules.pl
@@ -376,6 +376,7 @@ my $sth2 = $dbh->prepare("
 $sth2->execute($branch);
 
 while (my $row = $sth2->fetchrow_hashref) {
+    $row->{'current_branch'} ||= $row->{'branchcode'};
     $row->{'humanitemtype'} ||= $row->{'itemtype'};
     $row->{'default_humanitemtype'} = 1 if $row->{'humanitemtype'} eq '*';
     $row->{'humancategorycode'} ||= $row->{'categorycode'};
-- 
1.7.4.1



More information about the Koha-patches mailing list