From e31cddf8b0fca3f4847c093d52aa911cd502749e Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Mon, 8 Jul 2019 15:23:09 -0300 Subject: [PATCH] Bug 23281: Cleanup Koha::Patron::Attribute::Types->search Signed-off-by: Kyle M Hall Signed-off-by: Katrin Fischer Signed-off-by: Martin Renvoize --- Koha/Patron/Attribute/Types.pm | 32 ++------------------------------ 1 file changed, 2 insertions(+), 30 deletions(-) diff --git a/Koha/Patron/Attribute/Types.pm b/Koha/Patron/Attribute/Types.pm index 5064fd2479..dfd9c227fa 100644 --- a/Koha/Patron/Attribute/Types.pm +++ b/Koha/Patron/Attribute/Types.pm @@ -27,39 +27,11 @@ Koha::Patron::Attribute::Types Object set class =head1 API -=head2 Class Methods +=head2 Internal methods =cut -=head3 Koha::Patron::Attribute::Types->search(); - -my @attribute_types = Koha::Patron::Attribute::Types->search($params); - -=cut - -sub search { - my ( $self, $params, $attributes ) = @_; - - my $branchcode = $params->{branchcode}; - delete( $params->{branchcode} ); - - my $or = - $branchcode - ? { - '-or' => [ - 'borrower_attribute_types_branches.b_branchcode' => undef, - 'borrower_attribute_types_branches.b_branchcode' => $branchcode, - ] - } - : {}; - my $join = $branchcode ? { join => 'borrower_attribute_types_branches' } : {}; - $attributes //= {}; - $attributes = { %$attributes, %$join }; - return $self->SUPER::search( { %$params, %$or, }, $attributes ); -} - - -=head3 type +=head3 _type =cut -- 2.39.5