From 4f5d26aa4970f8abf7455f411ce5bb2c3694f631 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Thu, 3 Sep 2015 15:38:44 +0100 Subject: [PATCH] Bug 10855: (follow-up) Bug 10855: Remove additional field values when subscription is removed The subscriptionid should not be escaped and placeholders used. Signed-off-by: Jonathan Druart Signed-off-by: Tomas Cohen Arazi --- C4/Serials.pm | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/C4/Serials.pm b/C4/Serials.pm index 6c97c5f4e3..a15746052e 100644 --- a/C4/Serials.pm +++ b/C4/Serials.pm @@ -1839,10 +1839,9 @@ this function deletes subscription which has $subscriptionid as id. sub DelSubscription { my ($subscriptionid) = @_; my $dbh = C4::Context->dbh; - $subscriptionid = $dbh->quote($subscriptionid); - $dbh->do("DELETE FROM subscription WHERE subscriptionid=$subscriptionid"); - $dbh->do("DELETE FROM subscriptionhistory WHERE subscriptionid=$subscriptionid"); - $dbh->do("DELETE FROM serial WHERE subscriptionid=$subscriptionid"); + $dbh->do("DELETE FROM subscription WHERE subscriptionid=?", undef, $subscriptionid); + $dbh->do("DELETE FROM subscriptionhistory WHERE subscriptionid=?", undef, $subscriptionid); + $dbh->do("DELETE FROM serial WHERE subscriptionid=?", undef, $subscriptionid); my $afs = Koha::AdditionalField->all({tablename => 'subscription'}); foreach my $af (@$afs) { -- 2.39.5