Bugzilla – Attachment 7699 Details for
Bug 7546
Cannot view subscription detail - bareword error
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 7546 Do not call routine as bareword
Bug-7546-Do-not-call-routine-as-bareword.patch (text/plain), 2.81 KB, created by
Paul Poulain
on 2012-02-16 17:09:38 UTC
(
hide
)
Description:
Bug 7546 Do not call routine as bareword
Filename:
MIME Type:
Creator:
Paul Poulain
Created:
2012-02-16 17:09:38 UTC
Size:
2.81 KB
patch
obsolete
>From 500884e8c9b8875e5620ceb62b0e8a35a895b8d3 Mon Sep 17 00:00:00 2001 >From: Colin Campbell <colin.campbell@ptfs-europe.com> >Date: Thu, 16 Feb 2012 11:00:16 +0000 >Subject: [PATCH] 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> >--- > serials/serials-edit.pl | 13 +++++++------ > serials/subscription-detail.pl | 13 +++++++------ > 2 files changed, 14 insertions(+), 12 deletions(-) > >diff --git a/serials/serials-edit.pl b/serials/serials-edit.pl >index 9ecd09f..12f568c 100755 >--- a/serials/serials-edit.pl >+++ b/serials/serials-edit.pl >@@ -403,14 +403,15 @@ 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 8e7f418..d267bc3 100755 >--- a/serials/subscription-detail.pl >+++ b/serials/subscription-detail.pl >@@ -143,14 +143,15 @@ 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'; > } >-- >1.7.5.4
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 7546
:
7665
|
7666
|
7677
|
7697
|
7698
|
7699
|
7701
|
7703