This patch adds a C4::Search to subscription-detail.pl to compensate for a removed
one from auth.pm during the denesting effort.
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Bug 7546 Do not call routine as bareword
Fixes compilation errors due to calling routine without parens
Also nothing was gained (and obfuscation added) by forcing
the return into a hash ref have changed variable to hash
tidied up the if else chain
These routines should be refactored out future
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
bug 7546 follow-up, enabled_staff_search_views problem
* enabled_staff_search_views was not exported by C4::Search, should have been
* serials/serials-edit.pl were also missing it
Comments:
* checked with for file in */*.pl; do perl -wc $file; done that no script was still having this problem
Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Final sign off for all 3 patches
Note: I had some problems with tests, but it is probably related to my data and not this patch.
&AddSearchHistory
&GetDistinctValues
&BiblioAddAuthorities
&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)
);
#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)
use C4::Output;
use C4::Context;
use C4::Serials;
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();
use List::MoreUtils qw/uniq/;
my $query = CGI->new();
sub get_default_view {
my $defaultview = C4::Context->preference('IntranetBiblioDefaultView');
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} ) {
- } elsif ($defaultview eq 'marc' && $views->{can_view_MARC}) {
+ }
+ elsif ( $defaultview eq 'marc' && $views{can_view_MARC} ) {
- } elsif ($defaultview eq 'labeled_marc' && $views->{can_view_labeledMARC}) {
+ }
+ elsif ( $defaultview eq 'labeled_marc' && $views{can_view_labeledMARC} ) {
return 'labeledMARCdetail';
return 'labeledMARCdetail';
- } else {
- return 'detail';
use C4::Serials;
use C4::Output;
use C4::Context;
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;
use Date::Calc qw/Today Day_of_Year Week_of_Year Add_Delta_Days/;
use Carp;
sub get_default_view {
my $defaultview = C4::Context->preference('IntranetBiblioDefaultView');
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} ) {
- } elsif ($defaultview eq 'marc' && $views->{can_view_MARC}) {
+ }
+ elsif ( $defaultview eq 'marc' && $views{can_view_MARC} ) {
- } elsif ($defaultview eq 'labeled_marc' && $views->{can_view_labeledMARC}) {
+ }
+ elsif ( $defaultview eq 'labeled_marc' && $views{can_view_labeledMARC} ) {
return 'labeledMARCdetail';
return 'labeledMARCdetail';
- } else {
- return 'detail';