diff --git a/Koha/Virtualshelfshare.pm b/Koha/Virtualshelfshare.pm index 16bd017351..8a9252efe2 100644 --- a/Koha/Virtualshelfshare.pm +++ b/Koha/Virtualshelfshare.pm @@ -81,13 +81,13 @@ sub has_expired { return $has_expired == 1 ? 1 : 0 } -=head3 patron +=head3 sharee - Returns related Koha::Patron object for this share. + Returns related Koha::Patron object for the sharee (patron who got this share). =cut -sub patron { +sub sharee { my $self = shift; return Koha::Patron->_new_from_dbic( $self->{_result}->borrowernumber ); } diff --git a/opac/opac-shelves.pl b/opac/opac-shelves.pl index cce27b9f05..d93ae2c52a 100755 --- a/opac/opac-shelves.pl +++ b/opac/opac-shelves.pl @@ -272,7 +272,7 @@ if ( $op eq 'add_form' ) { my $patrons = []; my $shares = $shelf->get_shares->search({ borrowernumber => { '!=' => undef } }); while( my $share = $shares->next ) { - push @$patrons, { email => $share->patron->notice_email_address, borrowernumber => $share->get_column('borrowernumber') }; + push @$patrons, { email => $share->sharee->notice_email_address, borrowernumber => $share->get_column('borrowernumber') }; } $template->param( shared_users => $patrons ); $op = 'transfer';