Bugzilla – Attachment 21711 Details for
Bug 10983
Unused subroutines in C4:Budgets
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Proposed patch
0001-Bug-10983-Remove-unused-private-subroutines-from-C4-.patch (text/plain), 1.62 KB, created by
Colin Campbell
on 2013-10-02 09:06:02 UTC
(
hide
)
Description:
Proposed patch
Filename:
MIME Type:
Creator:
Colin Campbell
Created:
2013-10-02 09:06:02 UTC
Size:
1.62 KB
patch
obsolete
>From 9c137ac18e9c50b2301cd8740b384f0ee68ac633 Mon Sep 17 00:00:00 2001 >From: Colin Campbell <colin.campbell@ptfs-europe.com> >Date: Wed, 2 Oct 2013 09:25:16 +0100 >Subject: [PATCH] Bug 10983: Remove unused private subroutines from C4::Budgets > >The subroutine _filter_fields is not used by the module >and the sub _columns is only used by it > >Remove the dead code, and any associated bugs >--- > C4/Budgets.pm | 31 ------------------------------- > 1 file changed, 31 deletions(-) > >diff --git a/C4/Budgets.pm b/C4/Budgets.pm >index a648773..f3b82d4 100644 >--- a/C4/Budgets.pm >+++ b/C4/Budgets.pm >@@ -956,37 +956,6 @@ sub ConvertCurrency { > return ( $price / $cur ); > } > >-=head2 _columns >- >-returns an array containing fieldname followed by PRI as value if PRIMARY Key >- >-=cut >- >-sub _columns(;$) { >- my $tablename=shift||"aqbudgets"; >- return @{C4::Context->dbh->selectcol_arrayref("SHOW columns from $tablename",{Columns=>[1,4]})}; >-} >- >-sub _filter_fields{ >- my $budget=shift; >- my $tablename=shift; >- my @keys; >- my @values; >- my %columns= _columns($tablename); >- #Filter Primary Keys of table >- my $elements=join "|",grep {$columns{$_} ne "PRI"} keys %columns; >- foreach my $field (grep {/\b($elements)\b/} keys %$budget){ >- $$budget{$field}=format_date_in_iso($$budget{$field}) if ($field=~/date/ && $$budget{$field} !~C4::Dates->regexp("iso")); >- my $strkeys= " $field = ? "; >- if ($field=~/branch/){ >- $strkeys="( $strkeys OR $field='' OR $field IS NULL) "; >- } >- push @values, $$budget{$field}; >- push @keys, $strkeys; >- } >- return (\@keys,\@values); >-} >- > END { } # module clean-up code here (global destructor) > > 1; >-- >1.8.3.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 10983
:
21711
|
23455
|
23509