Bugzilla – Attachment 77262 Details for
Bug 17530
Don't show 'article request' link when no article requests are permitted
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 17530: (QA follow-up) Replace class_or_self variables
Bug-17530-QA-follow-up-Replace-classorself-variabl.patch (text/plain), 1.71 KB, created by
Marcel de Rooy
on 2018-07-25 14:30:33 UTC
(
hide
)
Description:
Bug 17530: (QA follow-up) Replace class_or_self variables
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2018-07-25 14:30:33 UTC
Size:
1.71 KB
patch
obsolete
>From e3dc1abbf0fc5e6d1fd8189120cd09d96067bbc9 Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Thu, 31 May 2018 09:53:00 +0200 >Subject: [PATCH] Bug 17530: (QA follow-up) Replace class_or_self variables >Content-Type: text/plain; charset=utf-8 > >See comment23. Requested by QA. > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > Koha/IssuingRules.pm | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) > >diff --git a/Koha/IssuingRules.pm b/Koha/IssuingRules.pm >index c72dd46..37cc45c 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.1.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 17530
:
72857
|
72858
|
72859
|
72860
|
72909
|
72910
|
72911
|
72912
|
72913
|
72914
|
72915
|
72930
|
72931
|
75697
|
75751
|
76617
|
76618
|
76619
|
76620
|
76621
|
76622
|
77258
|
77259
|
77260
|
77261
|
77262
|
77263
|
78030
|
78031
|
78032
|
78033
|
78034
|
78035
|
78362
|
78363
|
78364
|
78365
|
78366
|
78367
|
78368
|
78499