From d3a6013e20c157c66ab734eb428299817f1ccb09 Mon Sep 17 00:00:00 2001 From: Aleisha Amohia Date: Thu, 21 Dec 2017 03:34:22 +0000 Subject: [PATCH] Bug 19532: POD fix, renaming methods Tomas's comments: - renaming 'Class methods' to 'internal methods' - renaming 'borrower' and 'branch' methods to 'patron' and 'library' other comments are out of date with current patches and do not need to be actioned when testing, confirm all data still shows as expected and nothing is broken Signed-off-by: Nick Clemens --- Koha/Recall.pm | 18 +++++++++--------- Koha/Recalls.pm | 2 +- circ/returns.pl | 2 +- .../prog/en/includes/recalls-reports.inc | 4 ++-- .../intranet-tmpl/prog/en/includes/recalls.inc | 2 +- .../prog/en/modules/circ/recalls_overdue.tt | 4 ++-- .../prog/en/modules/circ/recalls_waiting.tt | 14 +++++++------- .../prog/en/modules/circ/returns.tt | 2 +- .../bootstrap/en/modules/opac-recalls.tt | 2 +- .../bootstrap/en/modules/opac-user.tt | 2 +- t/db_dependent/Koha/Recalls.t | 4 ++-- 11 files changed, 28 insertions(+), 28 deletions(-) diff --git a/Koha/Recall.pm b/Koha/Recall.pm index 6e2280beb4..ad51e36144 100644 --- a/Koha/Recall.pm +++ b/Koha/Recall.pm @@ -29,7 +29,7 @@ Koha::Recall - Koha Recall Object class =head1 API -=head2 Class Methods +=head2 Internal Methods =cut @@ -70,33 +70,33 @@ sub item { return $self->{_item}; } -=head3 borrower +=head3 patron Returns the related Koha::Patron object for this recall =cut -sub borrower { +sub patron { my ($self) = @_; - $self->{_borrower} ||= Koha::Patrons->find( $self->borrowernumber() ); + $self->{_patron} ||= Koha::Patrons->find( $self->borrowernumber() ); - return $self->{_borrower}; + return $self->{_patron}; } -=head3 branch +=head3 library Returns the related Koha::Library object for this recall =cut -sub branch { +sub library { my ($self) = @_; - $self->{_branch} ||= Koha::Libraries->find( $self->branchcode() ); + $self->{_library} ||= Koha::Libraries->find( $self->branchcode() ); - return $self->{_branch}; + return $self->{_library}; } =head3 checkout diff --git a/Koha/Recalls.pm b/Koha/Recalls.pm index 578f7c82d0..804d5a558a 100644 --- a/Koha/Recalls.pm +++ b/Koha/Recalls.pm @@ -30,7 +30,7 @@ Koha::Recalls - Koha Recalls Object Set class =head1 API -=head2 Class Methods +=head2 Internal Methods =cut diff --git a/circ/returns.pl b/circ/returns.pl index d0a300a603..3d9cecd0a5 100755 --- a/circ/returns.pl +++ b/circ/returns.pl @@ -191,7 +191,7 @@ if ( $query->param('reserve_id') ) { if ( $query->param('recall_id') ){ my $recall = Koha::Recalls->find(scalar $query->param('recall_id')); - my $recall_borrower = $recall->borrower; + my $recall_borrower = $recall->patron; my $item = Koha::Items->find($recall->itemnumber); my $biblio = Koha::Biblios->find($item->biblionumber); diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/recalls-reports.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/recalls-reports.inc index 825f98cf01..851e565f3c 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/recalls-reports.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/recalls-reports.inc @@ -26,7 +26,7 @@ - [% recall.borrower.firstname %] [% recall.borrower.surname %] ([% recall.borrowernumber %]) + [% recall.patron.firstname %] [% recall.patron.surname %] ([% recall.borrowernumber %]) @@ -59,7 +59,7 @@ - [% recall.branch.branchname %] + [% recall.library.branchname %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/recalls.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/recalls.inc index b17288b539..14d043639b 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/recalls.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/recalls.inc @@ -45,7 +45,7 @@ - [% recall.branch.branchname %] + [% recall.library.branchname %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/recalls_overdue.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/recalls_overdue.tt index 76828e5f08..5133938838 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/recalls_overdue.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/recalls_overdue.tt @@ -58,7 +58,7 @@ - [% recall.borrower.firstname %] [% recall.borrower.surname %] ([% recall.borrowernumber %]) + [% recall.patron.firstname %] [% recall.patron.surname %] ([% recall.borrowernumber %]) @@ -83,7 +83,7 @@ - [% recall.branch.branchname %] + [% recall.library.branchname %] Cancel diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/recalls_waiting.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/recalls_waiting.tt index 6a061bfb55..b09acaf811 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/recalls_waiting.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/recalls_waiting.tt @@ -75,10 +75,10 @@ [% recall.borrower.firstname %] [% recall.borrower.surname %] - [% IF ( recall.borrower.phone ) %]
[% recall.borrower.phone %][% END %] - [% IF ( recall.borrower.email ) %]
[% recall.borrower.email %][% END %] + [% IF ( recall.patron.phone ) %]
[% recall.patron.phone %][% END %] + [% IF ( recall.patron.email ) %]
[% recall.patron.email %][% END %] - [% recall.branch.branchname %] + [% recall.library.branchname %]
@@ -122,11 +122,11 @@
Barcode: [% recall.item.barcode %] - [% recall.borrower.firstname %] [% recall.borrower.surname %] - [% IF ( recall.borrower.phone ) %]
[% recall.borrower.phone %][% END %] - [% IF ( recall.borrower.email ) %]
[% recall.borrower.email %][% END %] + [% recall.patron.firstname %] [% recall.patron.surname %] + [% IF ( recall.patron.phone ) %]
[% recall.patron.phone %][% END %] + [% IF ( recall.patron.email ) %]
[% recall.patron.email %][% END %] - [% recall.branch.branchname %] + [% recall.library.branchname %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt index 6af799099c..e96cad4ba5 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt @@ -549,7 +549,7 @@
  • Patron's address is in doubt
  • [% END %] -

    Wait for pickup at [% recall.branch.branchname %]

    +

    Wait for pickup at [% recall.library.branchname %]

    diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-recalls.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-recalls.tt index 344fd9094e..a086ff63c6 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-recalls.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-recalls.tt @@ -84,7 +84,7 @@ Pick up location: - [% RECALL.branch.branchname %] + [% RECALL.library.branchname %] Status: diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt index fc6cb6e47d..2a59b09485 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt @@ -845,7 +845,7 @@ Pick up location: - [% RECALL.branch.branchname %] + [% RECALL.library.branchname %] Status: diff --git a/t/db_dependent/Koha/Recalls.t b/t/db_dependent/Koha/Recalls.t index 4e96e43044..76ad08f1bb 100644 --- a/t/db_dependent/Koha/Recalls.t +++ b/t/db_dependent/Koha/Recalls.t @@ -67,11 +67,11 @@ is( $recall->has_expired, 1, 'Recall has expired' ); is( $biblio->{biblionumber}, $recall->biblio->biblionumber, 'Can access biblio from recall' ); -is( $patron->{borrowernumber}, $recall->borrower->borrowernumber, 'Can access borrower from recall' ); +is( $patron->{borrowernumber}, $recall->patron->borrowernumber, 'Can access borrower from recall' ); is( $item->{itemnumber}, $recall->item->itemnumber, 'Can access item from recall' ); -is( $library->{branchcode}, $recall->branch->branchcode, 'Can access branch from recall' ); +is( $library->{branchcode}, $recall->library->branchcode, 'Can access branch from recall' ); is( $checkout->{issue_id}, $recall->checkout->issue_id, 'Can access checkout from recall' ); -- 2.19.1