From bc5971a71fd474d744c182d2c44e48bef275321c Mon Sep 17 00:00:00 2001 From: Chris Nighswonger Date: Wed, 22 Feb 2012 14:40:41 -0500 Subject: [PATCH] Revert "Bug 7546 - cannot view subscription detail" This reverts commit f6c55445ed2ef6fe5eaf99831b9ec180d12707ec. -This is related to de-nesting work (Bug 6875) which is unstable --- C4/Search.pm | 1 - serials/serials-edit.pl | 14 ++++++-------- serials/subscription-detail.pl | 14 ++++++-------- 3 files changed, 12 insertions(+), 17 deletions(-) diff --git a/C4/Search.pm b/C4/Search.pm index e32698600b..6f23fe8be8 100644 --- a/C4/Search.pm +++ b/C4/Search.pm @@ -71,7 +71,6 @@ This module provides searching functions for Koha's bibliographic databases &AddSearchHistory &GetDistinctValues &BiblioAddAuthorities - &enabled_staff_search_views ); #FIXME: i had to add BiblioAddAuthorities here because in Biblios.pm it caused circular dependencies (C4::Search uses C4::Biblio, and BiblioAddAuthorities uses SimpleSearch from C4::Search) diff --git a/serials/serials-edit.pl b/serials/serials-edit.pl index 5c87851a32..b66764a785 100755 --- a/serials/serials-edit.pl +++ b/serials/serials-edit.pl @@ -72,7 +72,6 @@ use C4::Koha; use C4::Output; use C4::Context; use C4::Serials; -use C4::Search qw/enabled_staff_search_views/; use List::MoreUtils qw/uniq/; my $query = CGI->new(); @@ -404,15 +403,14 @@ output_html_with_http_headers $query, $cookie, $template->output; sub get_default_view { my $defaultview = C4::Context->preference('IntranetBiblioDefaultView'); - my %views = C4::Search::enabled_staff_search_views(); - if ( $defaultview eq 'isbd' && $views{can_view_ISBD} ) { + my $views = { C4::Search::enabled_staff_search_views }; + if ($defaultview eq 'isbd' && $views->{can_view_ISBD}) { return 'ISBDdetail'; - } - elsif ( $defaultview eq 'marc' && $views{can_view_MARC} ) { + } elsif ($defaultview eq 'marc' && $views->{can_view_MARC}) { return 'MARCdetail'; - } - elsif ( $defaultview eq 'labeled_marc' && $views{can_view_labeledMARC} ) { + } elsif ($defaultview eq 'labeled_marc' && $views->{can_view_labeledMARC}) { return 'labeledMARCdetail'; + } else { + return 'detail'; } - return 'detail'; } diff --git a/serials/subscription-detail.pl b/serials/subscription-detail.pl index 0b6d35afa4..8e7f418133 100755 --- a/serials/subscription-detail.pl +++ b/serials/subscription-detail.pl @@ -24,7 +24,6 @@ use C4::Dates qw/format_date/; use C4::Serials; use C4::Output; use C4::Context; -use C4::Search qw/enabled_staff_search_views/; use Date::Calc qw/Today Day_of_Year Week_of_Year Add_Delta_Days/; use Carp; @@ -144,15 +143,14 @@ output_html_with_http_headers $query, $cookie, $template->output; sub get_default_view { my $defaultview = C4::Context->preference('IntranetBiblioDefaultView'); - my %views = C4::Search::enabled_staff_search_views(); - if ( $defaultview eq 'isbd' && $views{can_view_ISBD} ) { + my $views = { C4::Search::enabled_staff_search_views }; + if ($defaultview eq 'isbd' && $views->{can_view_ISBD}) { return 'ISBDdetail'; - } - elsif ( $defaultview eq 'marc' && $views{can_view_MARC} ) { + } elsif ($defaultview eq 'marc' && $views->{can_view_MARC}) { return 'MARCdetail'; - } - elsif ( $defaultview eq 'labeled_marc' && $views{can_view_labeledMARC} ) { + } elsif ($defaultview eq 'labeled_marc' && $views->{can_view_labeledMARC}) { return 'labeledMARCdetail'; + } else { + return 'detail'; } - return 'detail'; } -- 2.39.5