Bugzilla – Attachment 5497 Details for
Bug 6875
de-nesting C4 packages
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 6875 de-nesting C4/Branch.pm
Bug-6875-de-nesting-C4Branchpm.patch (text/plain), 2.94 KB, created by
Paul Poulain
on 2011-09-21 15:21:31 UTC
(
hide
)
Description:
Bug 6875 de-nesting C4/Branch.pm
Filename:
MIME Type:
Creator:
Paul Poulain
Created:
2011-09-21 15:21:31 UTC
Size:
2.94 KB
patch
obsolete
>From 373a008baa884797757520c663c895d3e10f7db7 Mon Sep 17 00:00:00 2001 >From: Paul Poulain <paul.poulain@biblibre.com> >Date: Fri, 16 Sep 2011 18:09:57 +0200 >Subject: [PATCH] Bug 6875 de-nesting C4/Branch.pm > >use C4::Koha was loaded only to call C4::Koha::get_infos_of in get_branchinfos_of > >the sub get_branchinfos_of was used nowhere >(checked with "grep -R get_branchinfos_of *") >only one reference was made to get_branchinfos_of, in reserve/request.pl, but the sub was not used in fact (maybe removed previously & silently) > >This patch removes sub get_branchinfos_of and use C4::Koha in C4::Branch, as well as the reference in request.pl and the t test > >The patch don't remove use C4::Branch in reserve/request.pl, it must be checked that it's useless first >--- > C4/Branch.pm | 29 ----------------------------- > reserve/request.pl | 2 +- > t/db_dependent/lib/KohaTest/Branch.pm | 1 - > 3 files changed, 1 insertions(+), 31 deletions(-) > >diff --git a/C4/Branch.pm b/C4/Branch.pm >index abcdbd6..7bd0326 100644 >--- a/C4/Branch.pm >+++ b/C4/Branch.pm >@@ -20,7 +20,6 @@ use strict; > #use warnings; FIXME - Bug 2505 > require Exporter; > use C4::Context; >-use C4::Koha; > > use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS); > >@@ -408,34 +407,6 @@ sub GetBranchDetail { > return $sth->fetchrow_hashref(); > } > >-=head2 get_branchinfos_of >- >- my $branchinfos_of = get_branchinfos_of(@branchcodes); >- >-Associates a list of branchcodes to the information of the branch, taken in >-branches table. >- >-Returns a href where keys are branchcodes and values are href where keys are >-branch information key. >- >- print 'branchname is ', $branchinfos_of->{$code}->{branchname}; >- >-=cut >- >-sub get_branchinfos_of { >- my @branchcodes = @_; >- >- my $query = ' >- SELECT branchcode, >- branchname >- FROM branches >- WHERE branchcode IN (' >- . join( ',', map( { "'" . $_ . "'" } @branchcodes ) ) . ') >-'; >- return C4::Koha::get_infos_of( $query, 'branchcode' ); >-} >- >- > =head2 GetBranchesInCategory > > my $branches = GetBranchesInCategory($categorycode); >diff --git a/reserve/request.pl b/reserve/request.pl >index b345845..0d87577 100755 >--- a/reserve/request.pl >+++ b/reserve/request.pl >@@ -28,7 +28,7 @@ script to place reserves/requests > > use strict; > use warnings; >-use C4::Branch; # GetBranches get_branchinfos_of >+use C4::Branch; > use CGI; > use List::MoreUtils qw/uniq/; > use Date::Calc qw/Date_to_Days/; >diff --git a/t/db_dependent/lib/KohaTest/Branch.pm b/t/db_dependent/lib/KohaTest/Branch.pm >index ce7ff60..c526d99 100644 >--- a/t/db_dependent/lib/KohaTest/Branch.pm >+++ b/t/db_dependent/lib/KohaTest/Branch.pm >@@ -20,7 +20,6 @@ sub methods : Test( 1 ) { > GetCategoryTypes > GetBranch > GetBranchDetail >- get_branchinfos_of > GetBranchesInCategory > GetBranchInfo > DelBranch >-- >1.7.4.1
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 6875
:
5442
|
5443
|
5496
|
5497
|
5498
|
5499
|
5500
|
5501
|
5502
|
5503
|
5504
|
5505
|
5506
|
5507
|
5508
|
5509
|
5510
|
5511
|
5512
|
7359
|
7360
|
7361
|
7362
|
7363
|
7364
|
7365
|
7652
|
7654
|
7655
|
7656
|
7657
|
7658
|
7770
|
7771
|
7808
|
7844
|
8095
|
8133
|
8134
|
8135