From 3fb069f8eca1674a10cb2e502ea76ae9d4a90e2d Mon Sep 17 00:00:00 2001 From: Josef Moravec Date: Mon, 1 Oct 2018 19:14:41 +0000 Subject: [PATCH] Bug 18887: (QA follow-up) Remove last occurences of old max_holds Signed-off-by: Josef Moravec Signed-off-by: Nick Clemens --- admin/smart-rules.pl | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/admin/smart-rules.pl b/admin/smart-rules.pl index bdeee64e01..d7161ff7e9 100755 --- a/admin/smart-rules.pl +++ b/admin/smart-rules.pl @@ -292,18 +292,18 @@ elsif ($op eq "add-branch-cat") { if ($branch eq "*") { if ($categorycode eq "*") { + #FIXME This block is will probably be never used my $sth_search = $dbh->prepare("SELECT count(*) AS total FROM default_circ_rules"); my $sth_insert = $dbh->prepare(q| INSERT INTO default_circ_rules - (maxissueqty, maxonsiteissueqty, max_holds) - VALUES (?, ?, ?) + (maxissueqty, maxonsiteissueqty) + VALUES (?, ?) |); my $sth_update = $dbh->prepare(q| UPDATE default_circ_rules SET maxissueqty = ?, maxonsiteissueqty = ?, - max_holds = ? |); $sth_search->execute(); @@ -385,14 +385,13 @@ elsif ($op eq "add-branch-cat") { AND categorycode = ?"); my $sth_insert = $dbh->prepare(q| INSERT INTO branch_borrower_circ_rules - (branchcode, categorycode, maxissueqty, maxonsiteissueqty, max_holds) - VALUES (?, ?, ?, ?, ?) + (branchcode, categorycode, maxissueqty, maxonsiteissueqty) + VALUES (?, ?, ?, ?) |); my $sth_update = $dbh->prepare(q| UPDATE branch_borrower_circ_rules SET maxissueqty = ?, maxonsiteissueqty = ? - max_holds = ? WHERE branchcode = ? AND categorycode = ? |); @@ -400,9 +399,9 @@ elsif ($op eq "add-branch-cat") { $sth_search->execute($branch, $categorycode); my $res = $sth_search->fetchrow_hashref(); if ($res->{total}) { - $sth_update->execute($maxissueqty, $maxonsiteissueqty, $max_holds, $branch, $categorycode); + $sth_update->execute($maxissueqty, $maxonsiteissueqty, $branch, $categorycode); } else { - $sth_insert->execute($branch, $categorycode, $maxissueqty, $maxonsiteissueqty, $max_holds); + $sth_insert->execute($branch, $categorycode, $maxissueqty, $maxonsiteissueqty); } Koha::CirculationRules->set_rule( -- 2.39.5