Bug 5670: remove useless call to ->new when ->search is enought
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Wed, 28 Sep 2016 09:21:44 +0000 (10:21 +0100)
committerKyle M Hall <kyle@bywatersolutions.com>
Fri, 21 Oct 2016 18:18:02 +0000 (18:18 +0000)
Signed-off-by: Claire Gravely <claire_gravely@hotmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
members/housebound.pl

index 2fa0fb0..ad3e88d 100755 (executable)
@@ -117,8 +117,8 @@ if ( $method eq 'updateconfirm' and $houseboundprofile ) {
     $method = undef;
 } elsif ( $method eq 'visit_update_or_create' ) {
     # We want to edit, edit a visit, so we must pass its details.
-    $deliverers = Koha::Patrons->new->search_housebound_deliverers;
-    $choosers = Koha::Patrons->new->search_housebound_choosers;
+    $deliverers = Koha::Patrons->search_housebound_deliverers;
+    $choosers = Koha::Patrons->search_housebound_choosers;
     $houseboundvisit = $visit;
 } elsif ( $method eq 'visit_delete' and $visit ) {
     # We want ot delete a specific visit.