Bugzilla – Attachment 45927 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 GetBranchCategory
Bug-15295-KohaLibraries---Remove-GetBranchCategory.patch (text/plain), 3.03 KB, created by
Martin Renvoize (ashimema)
on 2015-12-23 05:16:03 UTC
(
hide
)
Description:
Bug 15295: Koha::Libraries - Remove GetBranchCategory
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2015-12-23 05:16:03 UTC
Size:
3.03 KB
patch
obsolete
>From 917fad053a24a9c9ce0df51b1cbaa476109b49eb Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Thu, 3 Dec 2015 14:12:22 +0000 >Subject: [PATCH] Bug 15295: Koha::Libraries - Remove GetBranchCategory >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >This has been replaced with Koha::Libraries->find > >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 | 25 ------------------------- > t/db_dependent/Branch.t | 16 +--------------- > 2 files changed, 1 insertion(+), 40 deletions(-) > >diff --git a/C4/Branch.pm b/C4/Branch.pm >index 14fcd20..2397fd0 100644 >--- a/C4/Branch.pm >+++ b/C4/Branch.pm >@@ -28,7 +28,6 @@ BEGIN { > $VERSION = 3.07.00.049; > @ISA = qw(Exporter); > @EXPORT = qw( >- &GetBranchCategory > &GetBranchName > &GetBranch > &GetBranches >@@ -284,30 +283,6 @@ sub ModBranch { > } > } > >-=head2 GetBranchCategory >- >-$results = GetBranchCategory($categorycode); >- >-C<$results> is an hashref >- >-=cut >- >-sub GetBranchCategory { >- my ($catcode) = @_; >- return unless $catcode; >- >- my $dbh = C4::Context->dbh; >- my $sth; >- >- $sth = $dbh->prepare(q{ >- SELECT * >- FROM branchcategories >- WHERE categorycode = ? >- }); >- $sth->execute( $catcode ); >- return $sth->fetchrow_hashref; >-} >- > =head2 GetBranchCategories > > my $categories = GetBranchCategories($categorytype,$show_in_pulldown,$selected_in_pulldown); >diff --git a/t/db_dependent/Branch.t b/t/db_dependent/Branch.t >index c98ea1a..3ca302f 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 => 30; >+use Test::More tests => 26; > > use C4::Branch; > use Koha::Libraries; >@@ -34,7 +34,6 @@ BEGIN { > } > can_ok( > 'C4::Branch', qw( >- GetBranchCategory > GetBranchName > GetBranch > GetBranches >@@ -209,25 +208,12 @@ delete $cat2->{add}; > delete $new_category{add}; > is_deeply($categories, [ $cat1,$cat2,\%new_category ], 'retrieve all expected library categories (bug 10515)'); > >-#test GetBranchCategory >-my $cat1detail = GetBranchCategory( $cat1->{categorycode} ); >-delete $cat1->{add}; >-is_deeply( $cat1detail, $cat1, 'CAT1 details are right' ); >-my $category = GetBranchCategory('LIBCATCODE'); >-is_deeply($category, \%new_category, 'fetched newly added library category'); >- > my $del = Koha::LibraryCategories->find( $cat2->{categorycode} )->delete; > is( $del, 1, 'One row affected' ); > > $categories = GetBranchCategories(); > is( scalar( @$categories ), $count_cat + 2, "Category CAT2 deleted" ); > >-my $cat2detail = GetBranchCategory( $cat2->{categorycode} ); >-is( $cat2detail, undef, 'CAT2 doesnt exist' ); >- >-$category = GetBranchCategory(); >-is($category, undef, 'retrieve library category only if code is supplied (bug 10515)'); >- > $b2->{CAT1} = 1; > ModBranch($b2); > is( GetBranchesCount(), $count + 2, 'BRB added' ); >-- >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