Bugzilla – Attachment 55866 Details for
Bug 5670
Housebound Readers Module
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 5670: mv housebound_* to search_housebound_*
Bug-5670-mv-housebound-to-searchhousebound.patch (text/plain), 3.70 KB, created by
Jonathan Druart
on 2016-09-28 09:24:42 UTC
(
hide
)
Description:
Bug 5670: mv housebound_* to search_housebound_*
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2016-09-28 09:24:42 UTC
Size:
3.70 KB
patch
obsolete
>From 6f93cf68d87edde0b7d25a3015a33b8b44b3abd0 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Wed, 28 Sep 2016 10:17:46 +0100 >Subject: [PATCH] Bug 5670: mv housebound_* to search_housebound_* > >I think it's better to prefix the subroutine names used to search with >'search_'. >--- > Koha/Patrons.pm | 8 ++++---- > members/housebound.pl | 4 ++-- > t/db_dependent/Patron/Housebound.t | 14 +++++++------- > 3 files changed, 13 insertions(+), 13 deletions(-) > >diff --git a/Koha/Patrons.pm b/Koha/Patrons.pm >index 384a25c..13fd091 100644 >--- a/Koha/Patrons.pm >+++ b/Koha/Patrons.pm >@@ -37,13 +37,13 @@ Koha::Patron - Koha Patron Object class > > =cut > >-=head3 housebound_choosers >+=head3 search_housebound_choosers > > Returns all Patrons which are Housebound choosers. > > =cut > >-sub housebound_choosers { >+sub search_housebound_choosers { > my ( $self ) = @_; > my $cho = $self->_resultset->search > ->search_related('borrower_attributes', { >@@ -53,13 +53,13 @@ sub housebound_choosers { > return Koha::Patrons->_new_from_dbic($cho); > } > >-=head3 housebound_deliverers >+=head3 search_housebound_deliverers > > Returns all Patrons which are Housebound deliverers. > > =cut > >-sub housebound_deliverers { >+sub search_housebound_deliverers { > my ( $self ) = @_; > my $del = $self->_resultset->search > ->search_related('borrower_attributes', { >diff --git a/members/housebound.pl b/members/housebound.pl >index 77974e4..2fa0fb0 100755 >--- a/members/housebound.pl >+++ b/members/housebound.pl >@@ -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->housebound_deliverers; >- $choosers = Koha::Patrons->new->housebound_choosers; >+ $deliverers = Koha::Patrons->new->search_housebound_deliverers; >+ $choosers = Koha::Patrons->new->search_housebound_choosers; > $houseboundvisit = $visit; > } elsif ( $method eq 'visit_delete' and $visit ) { > # We want ot delete a specific visit. >diff --git a/t/db_dependent/Patron/Housebound.t b/t/db_dependent/Patron/Housebound.t >index 320dd61..a9728f1 100755 >--- a/t/db_dependent/Patron/Housebound.t >+++ b/t/db_dependent/Patron/Housebound.t >@@ -37,8 +37,8 @@ is( > # patron_choosers and patron_deliverers Tests > > # Current Patron Chooser / Deliverer count >-my $orig_del_count = Koha::Patrons->housebound_deliverers->count; >-my $orig_cho_count = Koha::Patrons->housebound_choosers->count; >+my $orig_del_count = Koha::Patrons->search_housebound_deliverers->count; >+my $orig_cho_count = Koha::Patrons->search_housebound_choosers->count; > > # We add one, just in case the above is 0, so we're guaranteed one of each. > my $patron_chooser = $builder->build({ source => 'Borrower' }); >@@ -63,12 +63,12 @@ $builder->build({ > }, > }); > >-# Test housebound_choosers >-is(Koha::Patrons->housebound_choosers->count, $orig_cho_count + 1, "Correct count of choosers."); >-is(Koha::Patrons->housebound_deliverers->count, $orig_del_count + 1, "Correct count of deliverers"); >+# Test search_housebound_choosers >+is(Koha::Patrons->search_housebound_choosers->count, $orig_cho_count + 1, "Correct count of choosers."); >+is(Koha::Patrons->search_housebound_deliverers->count, $orig_del_count + 1, "Correct count of deliverers"); > >-isa_ok(Koha::Patrons->housebound_choosers->next, "Koha::Patron"); >-isa_ok(Koha::Patrons->housebound_deliverers->next, "Koha::Patron"); >+isa_ok(Koha::Patrons->search_housebound_choosers->next, "Koha::Patron"); >+isa_ok(Koha::Patrons->search_housebound_deliverers->next, "Koha::Patron"); > > $schema->storage->txn_rollback; > >-- >2.8.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 5670
:
3038
|
22162
|
22163
|
22164
|
22165
|
26816
|
27288
|
50930
|
51377
|
51875
|
54384
|
54385
|
55326
|
55334
|
55335
|
55336
|
55734
|
55735
|
55736
|
55737
|
55738
|
55739
|
55865
|
55866
|
55867
|
55890
|
55891
|
56298
|
56299
|
56300
|
56301
|
56302
|
56308
|
56337
|
56341
|
56346
|
56347
|
56348
|
56349
|
56350
|
56351
|
56352
|
56353
|
56354
|
56355
|
56356
|
56357
|
56358
|
56359
|
56360
|
56361
|
56362
|
56363
|
56364
|
56365
|
56366
|
56367
|
56368
|
56369
|
56580
|
56581
|
56582
|
56583
|
56584
|
56585
|
56586
|
56587
|
56588
|
56589
|
56590
|
56591
|
56592
|
56593
|
56594
|
56595
|
56596
|
56597
|
56598
|
56599
|
56600
|
56601
|
56602
|
56603
|
56604
|
56605
|
56606