From bab89a6bf859ec6293f2893c858f4ef8dfa323af Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Thu, 29 Oct 2015 08:47:08 +0000 Subject: [PATCH] [PASSED QA] Bug 14836: Move Koha::PatronCategor* to Koha::Patron::Categor* Signed-off-by: Kyle M Hall --- Koha/{PatronCategories.pm => Patron/Categories.pm} | 8 ++++---- Koha/{PatronCategory.pm => Patron/Category.pm} | 4 ++-- admin/categorie.pl | 14 +++++++------- 3 files changed, 13 insertions(+), 13 deletions(-) rename Koha/{PatronCategories.pm => Patron/Categories.pm} (84%) rename Koha/{PatronCategory.pm => Patron/Category.pm} (97%) diff --git a/Koha/PatronCategories.pm b/Koha/Patron/Categories.pm similarity index 84% rename from Koha/PatronCategories.pm rename to Koha/Patron/Categories.pm index 4ce65c3..f220028 100644 --- a/Koha/PatronCategories.pm +++ b/Koha/Patron/Categories.pm @@ -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; diff --git a/Koha/PatronCategory.pm b/Koha/Patron/Category.pm similarity index 97% rename from Koha/PatronCategory.pm rename to Koha/Patron/Category.pm index fbb9c8e..1a81bc3 100644 --- a/Koha/PatronCategory.pm +++ b/Koha/Patron/Category.pm @@ -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 diff --git a/admin/categorie.pl b/admin/categorie.pl index bc3151d..cc153bd 100755 --- a/admin/categorie.pl +++ b/admin/categorie.pl @@ -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%" } }, -- 1.7.2.5