Bugzilla – Attachment 47603 Details for
Bug 15731
C4::Reports::Guided::build_authorised_value_list is not used
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 15731: Remove C4::Reports::Guided::build_authorised_value_list
Bug-15731-Remove-C4ReportsGuidedbuildauthorisedval.patch (text/plain), 4.08 KB, created by
Jonathan Druart
on 2016-02-03 16:06:50 UTC
(
hide
)
Description:
Bug 15731: Remove C4::Reports::Guided::build_authorised_value_list
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2016-02-03 16:06:50 UTC
Size:
4.08 KB
patch
obsolete
>From 9aa76a9a07268fea405aa0b8388811559ce3b995 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Wed, 3 Feb 2016 16:04:38 +0000 >Subject: [PATCH] Bug 15731: Remove > C4::Reports::Guided::build_authorised_value_list > >This subroutine has been added by > commit 42acfbf75b7bb4ee53c6a6f035e258a0b522ce10 > Bug 7993: Save reports with Group/Subgroup hierarchy > >But it has never been used (or git grep cheats me). > >Test plan: >1/ git grep build_authorised_value_list >should not return any result >2/ Create a report, execute it >Everything should work fine. >--- > C4/Reports/Guided.pm | 67 +--------------------------------------------------- > 1 file changed, 1 insertion(+), 66 deletions(-) > >diff --git a/C4/Reports/Guided.pm b/C4/Reports/Guided.pm >index 37eaf98..daf810d 100644 >--- a/C4/Reports/Guided.pm >+++ b/C4/Reports/Guided.pm >@@ -44,7 +44,7 @@ BEGIN { > save_report get_saved_reports execute_query get_saved_report create_compound run_compound > get_column_type get_distinct_values save_dictionary get_from_dictionary > delete_definition delete_report format_results get_sql >- nb_rows update_sql build_authorised_value_list >+ nb_rows update_sql > GetReservedAuthorisedValues > GetParametersFromSQL > IsAuthorisedValueValid >@@ -896,71 +896,6 @@ sub _get_column_defs { > return \%columns; > } > >-=head2 build_authorised_value_list($authorised_value) >- >-Returns an arrayref - hashref pair. The hashref consists of >-various code => name lists depending on the $authorised_value. >-The arrayref is the hashref keys, in appropriate order >- >-=cut >- >-sub build_authorised_value_list { >- my ( $authorised_value ) = @_; >- >- my $dbh = C4::Context->dbh; >- my @authorised_values; >- my %authorised_lib; >- >- # builds list, depending on authorised value... >- if ( $authorised_value eq "branches" ) { >- my $branches = GetBranchesLoop(); >- foreach my $thisbranch (@$branches) { >- push @authorised_values, $thisbranch->{value}; >- $authorised_lib{ $thisbranch->{value} } = $thisbranch->{branchname}; >- } >- } elsif ( $authorised_value eq "itemtypes" ) { >- my $sth = $dbh->prepare("SELECT itemtype,description FROM itemtypes ORDER BY description"); >- $sth->execute; >- while ( my ( $itemtype, $description ) = $sth->fetchrow_array ) { >- push @authorised_values, $itemtype; >- $authorised_lib{$itemtype} = $description; >- } >- } elsif ( $authorised_value eq "cn_source" ) { >- my $class_sources = GetClassSources(); >- my $default_source = C4::Context->preference("DefaultClassificationSource"); >- foreach my $class_source ( sort keys %$class_sources ) { >- next >- unless $class_sources->{$class_source}->{'used'} >- or ( $class_source eq $default_source ); >- push @authorised_values, $class_source; >- $authorised_lib{$class_source} = $class_sources->{$class_source}->{'description'}; >- } >- } elsif ( $authorised_value eq "categorycode" ) { >- my $sth = $dbh->prepare("SELECT categorycode, description FROM categories ORDER BY description"); >- $sth->execute; >- while ( my ( $categorycode, $description ) = $sth->fetchrow_array ) { >- push @authorised_values, $categorycode; >- $authorised_lib{$categorycode} = $description; >- } >- >- #---- "true" authorised value >- } else { >- my $authorised_values_sth = $dbh->prepare("SELECT authorised_value,lib FROM authorised_values WHERE category=? ORDER BY lib"); >- >- $authorised_values_sth->execute($authorised_value); >- >- while ( my ( $value, $lib ) = $authorised_values_sth->fetchrow_array ) { >- push @authorised_values, $value; >- $authorised_lib{$value} = $lib; >- >- # For item location, we show the code and the libelle >- $authorised_lib{$value} = $lib; >- } >- } >- >- return (\@authorised_values, \%authorised_lib); >-} >- > =head2 GetReservedAuthorisedValues > > my %reserved_authorised_values = GetReservedAuthorisedValues(); >-- >2.1.0
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 15731
:
47603
|
47643
|
47683