Bug 14836: Move Koha::PatronCategor* to Koha::Patron::Categor*

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
Jonathan Druart 2015-10-29 08:47:08 +00:00 committed by Tomas Cohen Arazi
parent 2e85a7bb11
commit 3c120e7b92
3 changed files with 13 additions and 13 deletions

View file

@ -1,4 +1,4 @@
package Koha::PatronCategories;
package Koha::Patron::Categories;
# This file is part of Koha.
#
@ -21,13 +21,13 @@ use Carp;
use Koha::Database;
use Koha::PatronCategory;
use Koha::Patron::Category;
use base qw(Koha::Objects);
=head1 NAME
Koha::PatronCategories - Koha PatronCategory Object set class
Koha::Patron::Categories - Koha Patron Category Object set class
=head1 API
@ -44,7 +44,7 @@ sub type {
}
sub object_class {
return 'Koha::PatronCategory';
return 'Koha::Patron::Category';
}
1;

View file

@ -1,4 +1,4 @@
package Koha::PatronCategory;
package Koha::Patron::Category;
# This file is part of Koha.
#
@ -27,7 +27,7 @@ use base qw(Koha::Object);
=head1 NAME
Koha::PatronCategory - Koha PatronCategory Object class
Koha::Patron;;Category - Koha Patron;;Category Object class
=head1 API

View file

@ -29,7 +29,7 @@ use C4::Form::MessagingPreferences;
use Koha::Borrowers;
use Koha::Database;
use Koha::DateUtils;
use Koha::PatronCategories;
use Koha::Patron::Categories;
my $input = new CGI;
my $searchfield = $input->param('description') // q||;
@ -51,7 +51,7 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
if ( $op eq 'add_form' ) {
my ( $category, $selected_branches );
if ($categorycode) {
$category = Koha::PatronCategories->find($categorycode);
$category = Koha::Patron::Categories->find($categorycode);
$selected_branches = $category->branch_limitations;
}
@ -100,7 +100,7 @@ elsif ( $op eq 'add_validate' ) {
}
if ($is_a_modif) {
my $category = Koha::PatronCategories->find( $categorycode );
my $category = Koha::Patron::Categories->find( $categorycode );
$category->categorycode($categorycode);
$category->description($description);
$category->enrolmentperiod($enrolmentperiod);
@ -125,7 +125,7 @@ elsif ( $op eq 'add_validate' ) {
}
}
else {
my $category = Koha::PatronCategory->new({
my $category = Koha::Patron::Category->new({
categorycode => $categorycode,
description => $description,
enrolmentperiod => $enrolmentperiod,
@ -166,7 +166,7 @@ elsif ( $op eq 'delete_confirm' ) {
categorycode => $categorycode
})->count;
my $category = Koha::PatronCategories->find($categorycode);
my $category = Koha::Patron::Categories->find($categorycode);
$template->param(
category => $category,
@ -177,7 +177,7 @@ elsif ( $op eq 'delete_confirm' ) {
elsif ( $op eq 'delete_confirmed' ) {
my $categorycode = uc( $input->param('categorycode') );
my $category = Koha::PatronCategories->find( $categorycode );
my $category = Koha::Patron::Categories->find( $categorycode );
my $deleted = eval { $category->delete; };
if ( $@ or not $deleted ) {
@ -190,7 +190,7 @@ elsif ( $op eq 'delete_confirmed' ) {
}
if ( $op eq 'list' ) {
my $categories = Koha::PatronCategories->search(
my $categories = Koha::Patron::Categories->search(
{
description => { -like => "$searchfield%" }
},