@@ -, +, @@
---
C4/Auth.pm | 1 -
C4/Biblio.pm | 62 --------------
C4/Items.pm | 98 ----------------------
C4/Search.pm | 1 -
C4/UsageStats.pm | 2 -
installer/data/mysql/sysprefs.sql | 1 -
.../prog/en/modules/admin/preferences/opac.pref | 6 --
.../en/modules/admin/preferences/staff_client.pref | 6 --
.../prog/en/modules/catalogue/results.tt | 8 --
.../en/modules/help/admin/authorised_values.tt | 3 -
.../bootstrap/en/includes/item-status.inc | 6 +-
.../opac-tmpl/bootstrap/en/modules/opac-detail.tt | 8 --
.../opac-tmpl/bootstrap/en/modules/opac-results.tt | 13 +--
opac/opac-detail.pl | 14 ----
t/db_dependent/UsageStats.t | 2 -
15 files changed, 2 insertions(+), 229 deletions(-)
--- a/C4/Auth.pm
+++ a/C4/Auth.pm
@@ -507,7 +507,6 @@ sub get_template_and_user {
$template->param(
OpacAdditionalStylesheet => C4::Context->preference("OpacAdditionalStylesheet"),
AnonSuggestions => "" . C4::Context->preference("AnonSuggestions"),
- AuthorisedValueImages => C4::Context->preference("AuthorisedValueImages"),
BranchesLoop => GetBranchesLoop($opac_name),
BranchCategoriesLoop => $library_categories,
opac_name => $opac_name,
--- a/C4/Biblio.pm
+++ a/C4/Biblio.pm
@@ -3470,68 +3470,6 @@ sub ModBiblioMarc {
return $biblionumber;
}
-=head2 get_biblio_authorised_values
-
-find the types and values for all authorised values assigned to this biblio.
-
-parameters:
- biblionumber
- MARC::Record of the bib
-
-returns: a hashref mapping the authorised value to the value set for this biblionumber
-
- $authorised_values = {
- 'Scent' => 'flowery',
- 'Audience' => 'Young Adult',
- 'itemtypes' => 'SER',
- };
-
-Notes: forlibrarian should probably be passed in, and called something different.
-
-=cut
-
-sub get_biblio_authorised_values {
- my $biblionumber = shift;
- my $record = shift;
-
- my $forlibrarian = 1; # are we in staff or opac?
- my $frameworkcode = GetFrameworkCode($biblionumber);
-
- my $authorised_values;
-
- my $tagslib = GetMarcStructure( $forlibrarian, $frameworkcode )
- or return $authorised_values;
-
- # assume that these entries in the authorised_value table are bibliolevel.
- # ones that start with 'item%' are item level.
- my $query = q(SELECT distinct authorised_value, kohafield
- FROM marc_subfield_structure
- WHERE authorised_value !=''
- AND (kohafield like 'biblio%'
- OR kohafield like '') );
- my $bibliolevel_authorised_values = C4::Context->dbh->selectall_hashref( $query, 'authorised_value' );
-
- foreach my $tag ( keys(%$tagslib) ) {
- foreach my $subfield ( keys( %{ $tagslib->{$tag} } ) ) {
-
- # warn "checking $subfield. type is: " . ref $tagslib->{ $tag }{ $subfield };
- if ( 'HASH' eq ref $tagslib->{$tag}{$subfield} ) {
- if ( defined $tagslib->{$tag}{$subfield}{'authorised_value'} && exists $bibliolevel_authorised_values->{ $tagslib->{$tag}{$subfield}{'authorised_value'} } ) {
- if ( defined $record->field($tag) ) {
- my $this_subfield_value = $record->field($tag)->subfield($subfield);
- if ( defined $this_subfield_value ) {
- $authorised_values->{ $tagslib->{$tag}{$subfield}{'authorised_value'} } = $this_subfield_value;
- }
- }
- }
- }
- }
- }
-
- # warn ( Data::Dumper->Dump( [ $authorised_values ], [ 'authorised_values' ] ) );
- return $authorised_values;
-}
-
=head2 CountBiblioInOrders
$count = &CountBiblioInOrders( $biblionumber);
--- a/C4/Items.pm
+++ a/C4/Items.pm
@@ -1760,104 +1760,6 @@ sub GetHiddenItemnumbers {
return @resultitems;
}
-=head3 get_item_authorised_values
-
-find the types and values for all authorised values assigned to this item.
-
-parameters: itemnumber
-
-returns: a hashref malling the authorised value to the value set for this itemnumber
-
- $authorised_values = {
- 'CCODE' => undef,
- 'DAMAGED' => '0',
- 'LOC' => '3',
- 'LOST' => '0'
- 'NOT_LOAN' => '0',
- 'RESTRICTED' => undef,
- 'STACK' => undef,
- 'WITHDRAWN' => '0',
- 'branches' => 'CPL',
- 'cn_source' => undef,
- 'itemtypes' => 'SER',
- };
-
-Notes: see C4::Biblio::get_biblio_authorised_values for a similar method at the biblio level.
-
-=cut
-
-sub get_item_authorised_values {
- my $itemnumber = shift;
-
- # assume that these entries in the authorised_value table are item level.
- my $query = q(SELECT distinct authorised_value, kohafield
- FROM marc_subfield_structure
- WHERE kohafield like 'item%'
- AND authorised_value != '' );
-
- my $itemlevel_authorised_values = C4::Context->dbh->selectall_hashref( $query, 'authorised_value' );
- my $iteminfo = GetItem( $itemnumber );
- # warn( Data::Dumper->Dump( [ $itemlevel_authorised_values ], [ 'itemlevel_authorised_values' ] ) );
- my $return;
- foreach my $this_authorised_value ( keys %$itemlevel_authorised_values ) {
- my $field = $itemlevel_authorised_values->{ $this_authorised_value }->{'kohafield'};
- $field =~ s/^items\.//;
- if ( exists $iteminfo->{ $field } ) {
- $return->{ $this_authorised_value } = $iteminfo->{ $field };
- }
- }
- # warn( Data::Dumper->Dump( [ $return ], [ 'return' ] ) );
- return $return;
-}
-
-=head3 get_authorised_value_images
-
-find a list of icons that are appropriate for display based on the
-authorised values for a biblio.
-
-parameters: listref of authorised values, such as comes from
-get_item_authorised_values or
-from C4::Biblio::get_biblio_authorised_values
-
-returns: listref of hashrefs for each image. Each hashref looks like this:
-
- { imageurl => '/intranet-tmpl/prog/img/itemtypeimg/npl/WEB.gif',
- label => '',
- category => '',
- value => '', }
-
-Notes: Currently, I put on the full path to the images on the staff
-side. This should either be configurable or not done at all. Since I
-have to deal with 'intranet' or 'opac' in
-get_biblio_authorised_values, perhaps I should be passing it in.
-
-=cut
-
-sub get_authorised_value_images {
- my $authorised_values = shift;
-
- my @imagelist;
-
- my $authorised_value_list = GetAuthorisedValues();
- # warn ( Data::Dumper->Dump( [ $authorised_value_list ], [ 'authorised_value_list' ] ) );
- foreach my $this_authorised_value ( @$authorised_value_list ) {
- if ( exists $authorised_values->{ $this_authorised_value->{'category'} }
- && $authorised_values->{ $this_authorised_value->{'category'} } eq $this_authorised_value->{'authorised_value'} ) {
- # warn ( Data::Dumper->Dump( [ $this_authorised_value ], [ 'this_authorised_value' ] ) );
- if ( defined $this_authorised_value->{'imageurl'} ) {
- push @imagelist, { imageurl => C4::Koha::getitemtypeimagelocation( 'intranet', $this_authorised_value->{'imageurl'} ),
- label => $this_authorised_value->{'lib'},
- category => $this_authorised_value->{'category'},
- value => $this_authorised_value->{'authorised_value'}, };
- }
- }
- }
-
- # warn ( Data::Dumper->Dump( [ \@imagelist ], [ 'imagelist' ] ) );
- return \@imagelist;
-
-}
-
=head1 LIMITED USE FUNCTIONS
The following functions, while part of the public API,
--- a/C4/Search.pm
+++ a/C4/Search.pm
@@ -1906,7 +1906,6 @@ sub searchResults {
# add imageurl to itemtype if there is one
$oldbiblio->{imageurl} = getitemtypeimagelocation( $search_context, $itemtypes{ $oldbiblio->{itemtype} }->{imageurl} );
- $oldbiblio->{'authorised_value_images'} = ($search_context eq 'opac' && C4::Context->preference('AuthorisedValueImages')) || ($search_context eq 'intranet' && C4::Context->preference('StaffAuthorisedValueImages')) ? C4::Items::get_authorised_value_images( C4::Biblio::get_biblio_authorised_values( $oldbiblio->{'biblionumber'}, $marcrecord ) ) : [];
$oldbiblio->{normalized_upc} = GetNormalizedUPC( $marcrecord,$marcflavour);
$oldbiblio->{normalized_ean} = GetNormalizedEAN( $marcrecord,$marcflavour);
$oldbiblio->{normalized_oclc} = GetNormalizedOCLCNumber($marcrecord,$marcflavour);
--- a/C4/UsageStats.pm
+++ a/C4/UsageStats.pm
@@ -217,7 +217,6 @@ sub BuildReport {
LetterLog
ReturnLog
SubscriptionLog
- AuthorisedValueImages
BiblioDefaultView
COinSinOPACResults
DisplayOPACiconsXSLT
@@ -312,7 +311,6 @@ sub BuildReport {
SubscriptionHistory
Display856uAsImage
DisplayIconsXSLT
- StaffAuthorisedValueImages
template
yuipath
HidePatronName
--- a/installer/data/mysql/sysprefs.sql
+++ a/installer/data/mysql/sysprefs.sql
@@ -446,7 +446,6 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `
('SpineLabelAutoPrint','0','','If this setting is turned on, a print dialog will automatically pop up for the quick spine label printer.','YesNo'),
('SpineLabelFormat','
[% SEARCH_RESULT.searchhighlightblob %]
[% END %] - [% IF ( SEARCH_RESULT.authorised_value_images ) %] -- [% FOREACH authorised_value_image IN SEARCH_RESULT.authorised_value_images %] - - [% END %] -
- [% END %] - [% END %] [% END %][% IF ( SEARCH_RESULT.norequests ) %] --- a/koha-tmpl/intranet-tmpl/prog/en/modules/help/admin/authorised_values.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/help/admin/authorised_values.tt @@ -63,7 +63,6 @@