From 8d53a1508d3fb8c6336839995f61036809ffedd2 Mon Sep 17 00:00:00 2001 From: Marcel de Rooy Date: Thu, 31 May 2018 09:53:00 +0200 Subject: [PATCH] Bug 17530: (QA follow-up) Replace class_or_self variables See comment23. Requested by QA. Signed-off-by: Marcel de Rooy Signed-off-by: Chris Cormack Signed-off-by: Nick Clemens --- Koha/IssuingRules.pm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Koha/IssuingRules.pm b/Koha/IssuingRules.pm index c72dd46dd9..37cc45c6b7 100644 --- a/Koha/IssuingRules.pm +++ b/Koha/IssuingRules.pm @@ -134,11 +134,11 @@ sub get_onshelfholds_policy { =cut sub article_requestable_rules { - my ( $class_or_self, $params ) = @_; + my ( $class, $params ) = @_; my $category = $params->{categorycode}; return if !C4::Context->preference('ArticleRequests'); - return $class_or_self->search({ + return $class->search({ $category ? ( categorycode => [ $category, '*' ] ) : (), article_requests => { '!=' => 'no' }, }); @@ -161,7 +161,7 @@ sub article_requestable_rules { =cut sub guess_article_requestable_itemtypes { - my ( $class_or_self, $params ) = @_; + my ( $class, $params ) = @_; my $category = $params->{categorycode}; return {} if !C4::Context->preference('ArticleRequests'); @@ -172,7 +172,7 @@ sub guess_article_requestable_itemtypes { if $last_article_requestable_guesses && exists $last_article_requestable_guesses->{$key}; my $res = {}; - my $rules = $class_or_self->article_requestable_rules({ + my $rules = $class->article_requestable_rules({ $category ? ( categorycode => $category ) : (), }); return $res if !$rules; -- 2.39.5