Bug 17796: Move Koha::OldIssue[s] to Koha::Checkout[s]
Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
This commit is contained in:
parent
be140718d7
commit
68b6d3976c
|
|
@ -1,4 +1,4 @@
|
|||
package Koha::OldIssue;
|
||||
package Koha::Old::Checkout;
|
||||
|
||||
# This file is part of Koha.
|
||||
#
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package Koha::OldIssues;
|
||||
package Koha::Old::Checkouts;
|
||||
|
||||
# This file is part of Koha.
|
||||
#
|
||||
|
|
@ -18,7 +18,7 @@ package Koha::OldIssues;
|
|||
use Modern::Perl;
|
||||
|
||||
use Koha::Database;
|
||||
use Koha::OldIssue;
|
||||
use Koha::Old::Checkout;
|
||||
|
||||
use base qw(Koha::Objects);
|
||||
|
||||
|
|
@ -27,7 +27,7 @@ sub _type {
|
|||
}
|
||||
|
||||
sub object_class {
|
||||
return 'Koha::OldIssue';
|
||||
return 'Koha::Old::Checkout';
|
||||
}
|
||||
|
||||
1;
|
||||
|
|
@ -28,7 +28,7 @@ use Koha::Checkouts;
|
|||
use Koha::Database;
|
||||
use Koha::DateUtils;
|
||||
use Koha::Holds;
|
||||
use Koha::OldIssues;
|
||||
use Koha::Old::Checkouts;
|
||||
use Koha::Patron::Categories;
|
||||
use Koha::Patron::HouseboundProfile;
|
||||
use Koha::Patron::HouseboundRole;
|
||||
|
|
@ -261,7 +261,7 @@ sub do_check_for_previous_checkout {
|
|||
return 1 if $issues->count; # 0 || N
|
||||
|
||||
# Check old issues table
|
||||
my $old_issues = Koha::OldIssues->search($criteria);
|
||||
my $old_issues = Koha::Old::Checkouts->search($criteria);
|
||||
return $old_issues->count; # 0 || N
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ use C4::Context;
|
|||
use Koha::Account::Lines;
|
||||
use Koha::Checkouts;
|
||||
use Koha::Holds;
|
||||
use Koha::OldIssues;
|
||||
use Koha::Old::Checkouts;
|
||||
use Koha::Patrons;
|
||||
|
||||
=head1 NAME
|
||||
|
|
@ -261,7 +261,7 @@ sub _object_ownership_by_borrowernumber {
|
|||
|
||||
First, attempts to find a Koha::Checkout-object by C<$issue_id>. If we find one,
|
||||
compare its borrowernumber to currently logged in C<$user>. However, if an issue
|
||||
is not found, attempt to find a Koha::OldIssue-object instead and compare its
|
||||
is not found, attempt to find a Koha::Old::Checkout-object instead and compare its
|
||||
borrowernumber to currently logged in C<$user>.
|
||||
|
||||
=cut
|
||||
|
|
@ -270,7 +270,7 @@ sub _object_ownership_by_checkout_id {
|
|||
my ($c, $user, $issue_id) = @_;
|
||||
|
||||
my $issue = Koha::Checkouts->find($issue_id);
|
||||
$issue = Koha::OldIssues->find($issue_id) unless $issue;
|
||||
$issue = Koha::Old::Checkouts->find($issue_id) unless $issue;
|
||||
return $issue && $issue->borrowernumber
|
||||
&& $user->borrowernumber == $issue->borrowernumber;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue