Bugzilla – Attachment 58291 Details for
Bug 17796
Koha::Issues should be moved to Koha::Checkouts
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 17796: Move Koha::OldIssue[s] to Koha::Checkout[s]
Bug-17796-Move-KohaOldIssues-to-KohaCheckouts.patch (text/plain), 3.25 KB, created by
Jonathan Druart
on 2016-12-20 13:28:39 UTC
(
hide
)
Description:
Bug 17796: Move Koha::OldIssue[s] to Koha::Checkout[s]
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2016-12-20 13:28:39 UTC
Size:
3.25 KB
patch
obsolete
>From 7e83f1dda881bc0b930d61259d5846462843ec81 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Tue, 20 Dec 2016 14:28:00 +0100 >Subject: [PATCH] Bug 17796: Move Koha::OldIssue[s] to Koha::Checkout[s] > >--- > Koha/{OldIssue.pm => Old/Issue.pm} | 2 +- > Koha/{OldIssues.pm => Old/Issues.pm} | 6 +++--- > Koha/Patron.pm | 4 ++-- > Koha/REST/V1.pm | 6 +++--- > 4 files changed, 9 insertions(+), 9 deletions(-) > rename Koha/{OldIssue.pm => Old/Issue.pm} (96%) > rename Koha/{OldIssues.pm => Old/Issues.pm} (91%) > >diff --git a/Koha/OldIssue.pm b/Koha/Old/Issue.pm >similarity index 96% >rename from Koha/OldIssue.pm >rename to Koha/Old/Issue.pm >index 5b3784d..9901cd7 100644 >--- a/Koha/OldIssue.pm >+++ b/Koha/Old/Issue.pm >@@ -1,4 +1,4 @@ >-package Koha::OldIssue; >+package Koha::Old::Issue; > > # This file is part of Koha. > # >diff --git a/Koha/OldIssues.pm b/Koha/Old/Issues.pm >similarity index 91% >rename from Koha/OldIssues.pm >rename to Koha/Old/Issues.pm >index 56edfb1..429670b 100644 >--- a/Koha/OldIssues.pm >+++ b/Koha/Old/Issues.pm >@@ -1,4 +1,4 @@ >-package Koha::OldIssues; >+package Koha::Old::Issues; > > # 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::Issue; > > use base qw(Koha::Objects); > >@@ -27,7 +27,7 @@ sub _type { > } > > sub object_class { >- return 'Koha::OldIssue'; >+ return 'Koha::Old::Issue'; > } > > 1; >diff --git a/Koha/Patron.pm b/Koha/Patron.pm >index fe2d844..9c6e051 100644 >--- a/Koha/Patron.pm >+++ b/Koha/Patron.pm >@@ -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 > } > >diff --git a/Koha/REST/V1.pm b/Koha/REST/V1.pm >index 5e1eded..e307552 100644 >--- a/Koha/REST/V1.pm >+++ b/Koha/REST/V1.pm >@@ -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; > } >-- >2.9.3
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 17796
:
58290
|
58291
|
58292
|
58296
|
58297
|
58301
|
58302