Bugzilla – Attachment 45929 Details for
Bug 15295
Move the C4::Branch related code to Koha::Libraries - part 2
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 15295: Koha::Libraries - Remove GetCategoryTypes
Bug-15295-KohaLibraries---Remove-GetCategoryTypes.patch (text/plain), 2.78 KB, created by
Martin Renvoize (ashimema)
on 2015-12-23 05:16:15 UTC
(
hide
)
Description:
Bug 15295: Koha::Libraries - Remove GetCategoryTypes
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2015-12-23 05:16:15 UTC
Size:
2.78 KB
patch
obsolete
>From c66ecdf6d263fd24c0c334c0ab3d0a82803c436a Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Thu, 3 Dec 2015 14:42:11 +0000 >Subject: [PATCH] Bug 15295: Koha::Libraries - Remove GetCategoryTypes >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >'searchdomain' and 'properties' were hardcoded in this subroutine. >Now there are in the admin script. Not a big deal, we could improve that >later if someone wants to add a third values. > >Signed-off-by: Marc Véron <veron@veron.ch> >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> > >http://bugs.koha-community.org/show_bug.cgi?id=15294 >--- > C4/Branch.pm | 19 ------------------- > t/db_dependent/Branch.t | 7 +------ > 2 files changed, 1 insertion(+), 25 deletions(-) > >diff --git a/C4/Branch.pm b/C4/Branch.pm >index 2e9a9c6..e6c4853 100644 >--- a/C4/Branch.pm >+++ b/C4/Branch.pm >@@ -37,7 +37,6 @@ BEGIN { > &get_branchinfos_of > &ModBranch > &GetBranchInfo >- &GetCategoryTypes > &GetBranchesInCategory > &ModBranchCategoryInfo > &mybranch >@@ -283,24 +282,6 @@ sub ModBranch { > } > } > >-=head2 GetCategoryTypes >- >-$categorytypes = GetCategoryTypes; >-returns a list of category types. >-Currently these types are HARDCODED. >-type: 'searchdomain' defines a group of agencies that the calling library may search in. >-Other usage of agency categories falls under type: 'properties'. >- to allow for other uses of categories. >-The searchdomain bit may be better implemented as a separate module, but >-the categories were already here, and minimally used. >- >-=cut >- >- #TODO manage category types. rename possibly to 'agency domains' ? as borrowergroups are called categories. >-sub GetCategoryTypes { >- return ( 'searchdomain','properties'); >-} >- > =head2 GetBranch > > $branch = GetBranch( $query, $branches ); >diff --git a/t/db_dependent/Branch.t b/t/db_dependent/Branch.t >index afac90e..2595704 100644 >--- a/t/db_dependent/Branch.t >+++ b/t/db_dependent/Branch.t >@@ -21,7 +21,7 @@ use Modern::Perl; > use C4::Context; > use Data::Dumper; > >-use Test::More tests => 24; >+use Test::More tests => 23; > > use C4::Branch; > use Koha::Libraries; >@@ -42,7 +42,6 @@ can_ok( > get_branchinfos_of > ModBranch > GetBranchInfo >- GetCategoryTypes > GetBranchesInCategory > ModBranchCategoryInfo > mybranch >@@ -293,10 +292,6 @@ $brCat1 = GetBranchesInCategory( $cat1->{categorycode} ); > push( @b, $b3->{branchcode} ); > is_deeply( $brCat1, \@b, 'CAT1 has branch BRB and BRC' ); > >-#Test GetCategoryTypes >-my @category_types = GetCategoryTypes(); >-is_deeply(\@category_types, [ 'searchdomain', 'properties' ], 'received expected library category types'); >- > #TODO later: test mybranchine and onlymine > # Actually we cannot mock C4::Context->userenv in unit tests > >-- >2.1.4
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 15295
:
45368
|
45369
|
45370
|
45371
|
45372
|
45373
|
45374
|
45375
|
45752
|
45754
|
45755
|
45756
|
45757
|
45760
|
45763
|
45764
|
45765
|
45924
|
45925
|
45926
|
45927
|
45928
| 45929 |
45930
|
45931
|
46684
|
46696