Lines 23-29
use C4::Context;
Link Here
|
23 |
use Koha::Account::Lines; |
23 |
use Koha::Account::Lines; |
24 |
use Koha::Checkouts; |
24 |
use Koha::Checkouts; |
25 |
use Koha::Holds; |
25 |
use Koha::Holds; |
26 |
use Koha::OldIssues; |
26 |
use Koha::Old::Checkouts; |
27 |
use Koha::Patrons; |
27 |
use Koha::Patrons; |
28 |
|
28 |
|
29 |
=head1 NAME |
29 |
=head1 NAME |
Lines 261-267
sub _object_ownership_by_borrowernumber {
Link Here
|
261 |
|
261 |
|
262 |
First, attempts to find a Koha::Checkout-object by C<$issue_id>. If we find one, |
262 |
First, attempts to find a Koha::Checkout-object by C<$issue_id>. If we find one, |
263 |
compare its borrowernumber to currently logged in C<$user>. However, if an issue |
263 |
compare its borrowernumber to currently logged in C<$user>. However, if an issue |
264 |
is not found, attempt to find a Koha::OldIssue-object instead and compare its |
264 |
is not found, attempt to find a Koha::Old::Checkout-object instead and compare its |
265 |
borrowernumber to currently logged in C<$user>. |
265 |
borrowernumber to currently logged in C<$user>. |
266 |
|
266 |
|
267 |
=cut |
267 |
=cut |
Lines 270-276
sub _object_ownership_by_checkout_id {
Link Here
|
270 |
my ($c, $user, $issue_id) = @_; |
270 |
my ($c, $user, $issue_id) = @_; |
271 |
|
271 |
|
272 |
my $issue = Koha::Checkouts->find($issue_id); |
272 |
my $issue = Koha::Checkouts->find($issue_id); |
273 |
$issue = Koha::OldIssues->find($issue_id) unless $issue; |
273 |
$issue = Koha::Old::Checkouts->find($issue_id) unless $issue; |
274 |
return $issue && $issue->borrowernumber |
274 |
return $issue && $issue->borrowernumber |
275 |
&& $user->borrowernumber == $issue->borrowernumber; |
275 |
&& $user->borrowernumber == $issue->borrowernumber; |
276 |
} |
276 |
} |
277 |
- |
|
|