bug 2915 followup - small efficiency improvement
Following up on a suggestion by Joe Atzberger, save a database query by not counting the subscriptions to delete; instead, simply fetch a list of them. No user-visible change. Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
This commit is contained in:
parent
46037ac61a
commit
a2b1922b66
1 changed files with 3 additions and 5 deletions
|
@ -379,12 +379,10 @@ sub DelBiblio {
|
|||
return $error if $error;
|
||||
|
||||
# We delete attached subscriptions
|
||||
if(C4::Serials::CountSubscriptionFromBiblionumber($biblionumber) != 0){
|
||||
my $subscriptions = &C4::Serials::GetFullSubscriptionsFromBiblionumber($biblionumber);
|
||||
foreach my $subscription (@$subscriptions){
|
||||
&C4::Serials::DelSubscription($subscription->{subscriptionid});
|
||||
}
|
||||
}
|
||||
|
||||
# Delete in Zebra. Be careful NOT to move this line after _koha_delete_biblio
|
||||
# for at least 2 reasons :
|
||||
|
|
Loading…
Reference in a new issue