Bugzilla – Attachment 92738 Details for
Bug 15497
Limit item types by library
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 15497: (QA follow-up) Use the methods from bug 23281 instead
Bug-15497-QA-follow-up-Use-the-methods-from-bug-23.patch (text/plain), 2.03 KB, created by
Martin Renvoize (ashimema)
on 2019-09-12 15:22:30 UTC
(
hide
)
Description:
Bug 15497: (QA follow-up) Use the methods from bug 23281 instead
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2019-09-12 15:22:30 UTC
Size:
2.03 KB
patch
obsolete
>From 5bf9c612f2e80860a04fccdb8b0549d397eb88d8 Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Thu, 12 Sep 2019 11:17:04 -0300 >Subject: [PATCH] Bug 15497: (QA follow-up) Use the methods from bug 23281 > instead > >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > Koha/ItemTypes.pm | 41 +++-------------------------------------- > 1 file changed, 3 insertions(+), 38 deletions(-) > >diff --git a/Koha/ItemTypes.pm b/Koha/ItemTypes.pm >index e0f9ad3bcd..f8c53e9bd3 100644 >--- a/Koha/ItemTypes.pm >+++ b/Koha/ItemTypes.pm >@@ -24,7 +24,7 @@ use C4::Languages; > use Koha::Database; > use Koha::ItemType; > >-use base qw(Koha::Objects); >+use base qw(Koha::Objects Koha::Objects::Limit::Library); > > =head1 NAME > >@@ -32,7 +32,7 @@ Koha::ItemTypes - Koha ItemType Object set class > > =head1 API > >-=head2 Class Methods >+=head2 Class methods > > =cut > >@@ -62,42 +62,7 @@ sub search_with_localization { > } > } > >-=head3 search_with_library_limits >- >-search itemtypes by library >- >-my @itemtypes = Koha::ItemTypes->search_with_library_limits({branchcode => branchcode}); >- >-=cut >- >-sub search_with_library_limits { >- my ( $self, $params, $attributes ) = @_; >- >- my $branchcode = $params->{branchcode}; >- delete( $params->{branchcode} ); >- >- return $self->SUPER::search( $params, $attributes ) unless $branchcode; >- >- my $where = { >- '-or' => [ >- 'itemtypes_branches.branchcode' => undef, >- 'itemtypes_branches.branchcode' => $branchcode >- ] >- }; >- >- $attributes //= {}; >- if(exists $attributes->{join}) { >- if(ref $attributes->{join} eq 'ARRAY') { >- push @{$attributes->{join}}, 'itemtypes_branches'; >- } else { >- $attributes->{join} = [ $attributes->{join}, 'itemtypes_branches' ]; >- } >- } else { >- $attributes->{join} = 'itemtypes_branches'; >- } >- >- return $self->SUPER::search( { %$params, %$where, }, $attributes ); >-} >+=head2 Internal methods > > =head3 type > >-- >2.20.1
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 15497
:
91377
|
91378
|
91379
|
91446
|
91450
|
91451
|
91452
|
91469
|
92725
|
92726
|
92727
|
92728
|
92732
|
92735
|
92736
|
92737
|
92738
|
92739
|
92741
|
92742
|
92743
|
92744
|
92745