Bugzilla – Attachment 44253 Details for
Bug 14836
Move the patron categories related code to Koha::Patron::Categories - part 1
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[PASSED QA] Bug 14836: Move Koha::PatronCategor* to Koha::Patron::Categor*
PASSED-QA-Bug-14836-Move-KohaPatronCategor-to-Koha.patch (text/plain), 4.45 KB, created by
Kyle M Hall (khall)
on 2015-10-30 18:57:59 UTC
(
hide
)
Description:
[PASSED QA] Bug 14836: Move Koha::PatronCategor* to Koha::Patron::Categor*
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2015-10-30 18:57:59 UTC
Size:
4.45 KB
patch
obsolete
>From bab89a6bf859ec6293f2893c858f4ef8dfa323af Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >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 <kyle@bywatersolutions.com> >--- > 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
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 14836
:
42616
|
42617
|
44059
|
44060
|
44061
|
44139
|
44140
|
44141
|
44142
|
44250
|
44251
|
44252
| 44253 |
44254
|
44255
|
44519