From 4f747ab5d7586bef8f922f55f3c723f8371f0987 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 --- Koha/Recall.pm | 18 +++++++++--------- Koha/Recalls.pm | 2 +- circ/returns.pl | 2 +- .../intranet-tmpl/prog/en/includes/recalls-reports.inc | 4 ++-- koha-tmpl/intranet-tmpl/prog/en/includes/recalls.inc | 2 +- .../prog/en/modules/circ/recalls_overdue.tt | 4 ++-- .../prog/en/modules/circ/recalls_waiting.tt | 14 +++++++------- .../intranet-tmpl/prog/en/modules/circ/returns.tt | 2 +- .../opac-tmpl/bootstrap/en/modules/opac-recalls.tt | 2 +- koha-tmpl/opac-tmpl/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 6e2280b..ad51e36 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 578f7c8..804d5a5 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 8b28527..6e70989 100755 --- a/circ/returns.pl +++ b/circ/returns.pl @@ -194,7 +194,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 825f98c..851e565 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 b17288b..14d0436 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 dc7bc16..5a13b62 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 @@ -59,7 +59,7 @@ - [% recall.borrower.firstname %] [% recall.borrower.surname %] ([% recall.borrowernumber %]) + [% recall.patron.firstname %] [% recall.patron.surname %] ([% recall.borrowernumber %]) @@ -84,7 +84,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 4cb2983..738b544 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 @@ -77,10 +77,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 %]
@@ -124,11 +124,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 d67fa34..74603cb 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt @@ -499,7 +499,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 b9c82a6..d2388a2 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-recalls.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-recalls.tt @@ -85,7 +85,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 0a9c801..51c7648 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt @@ -835,7 +835,7 @@ Using this account is not recommended because some parts of Koha will not functi 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 4e96e43..76ad08f 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.1.4