From fc59bbf5ace43898791e28a48cc08f5581182fab Mon Sep 17 00:00:00 2001 From: Gabriel DeCarufel Date: Wed, 8 Jan 2020 16:23:14 -0500 Subject: [PATCH] Bug 17385: QA Critics Fixed and added Missing Filters Signed-off-by: David Nind --- C4/XSLT.pm | 13 ++++++++++--- koha-tmpl/intranet-tmpl/prog/en/includes/cat-toolbar.inc | 2 +- .../prog/en/includes/virtualshelves-toolbar.inc | 2 +- koha-tmpl/intranet-tmpl/prog/en/modules/basket/basket.tt | 2 +- koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt | 2 +- .../prog/en/modules/virtualshelves/downloadshelf.tt | 2 +- .../opac-tmpl/bootstrap/en/includes/opac-detail-sidebar.inc | 2 +- .../opac-tmpl/bootstrap/en/modules/opac-downloadcart.tt | 2 +- .../opac-tmpl/bootstrap/en/modules/opac-downloadshelf.tt | 2 +- 9 files changed, 18 insertions(+), 11 deletions(-) diff --git a/C4/XSLT.pm b/C4/XSLT.pm index f324433bd2..6c10793529 100644 --- a/C4/XSLT.pm +++ b/C4/XSLT.pm @@ -164,6 +164,12 @@ sub _get_best_default_xslt_filename { return $xslfilename; } +=head2 get_xslt_sysprefs + + returns XML xslt sysprefs. + +=cut + sub get_xslt_sysprefs { my $sysxml = "\n"; foreach my $syspref ( qw/ hidelostitems OPACURLOpenInNewWindow @@ -268,7 +274,7 @@ sub XSLTParse4Display { } my $xmlrecord = $record->as_xml(C4::Context->preference('marcflavour')); - $variables ||= {}; + my $variables ||= {}; if (C4::Context->preference('OPACShowOpenURL')) { my @biblio_itemtypes; my $biblio = Koha::Biblios->find($biblionumber); @@ -426,7 +432,7 @@ sub CustomXSLTExportList { '/' . C4::Context->preference( $opac ? "opacthemes" : "template") . '/' . C4::Languages::getlanguage() . '/xslt/biblioexport'; - my @files = <$dir/*.xsl>; + my @files = glob qq("$dir/*.xsl"); foreach my $file (@files) { if ( -f "$file" ) { (my $text = $file) =~ s/.*\///g; @@ -443,7 +449,8 @@ sub CustomXSLTExportList { # Get output format # There should only be one xsl:output node, so taking the first one only is OK $node = @{$node->findnodes("xsl:output")}[0]; - my $outputformat = $node->{"method"} if $node; + my $outputformat= ""; + $outputformat = $node->{"method"} if $node; $outputformat = "txt" if ($outputformat eq "" || $outputformat eq "text"); my %row = ( diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/cat-toolbar.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/cat-toolbar.inc index bad2332de1..a12f95abb0 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/cat-toolbar.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/cat-toolbar.inc @@ -97,7 +97,7 @@ CAN_user_serials_create_subscription ) %]
  • MODS (XML)
  • RIS
  • [% FOREACH filesOption IN filesOptions %] -
  • [% filesOption.filename %]
  • +
  • [% filesOption.filename | html %]
  • [% END %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/virtualshelves-toolbar.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/virtualshelves-toolbar.inc index 6c5bd3db77..c241f343f3 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/virtualshelves-toolbar.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/virtualshelves-toolbar.inc @@ -32,7 +32,7 @@
  • CSV - [% csv_profile.profile | html %]
  • [% END %] [% FOREACH xsl_export IN xsl_exports %] -
  • XSL - [% xsl_export.filename %]
  • +
  • XSL - [% xsl_export.filename | html %]
  • [% END %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/basket/basket.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/basket/basket.tt index 9c388ba1bc..ce428c396e 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/basket/basket.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/basket/basket.tt @@ -57,7 +57,7 @@
  • CSV - [% csv_profile.profile | html %]
  • [% END %] [% FOREACH xsl_export IN xsl_exports %] -
  • XSL - [% xsl_export.filename %]
  • +
  • XSL - [% xsl_export.filename | html %]
  • [% END %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt index 3637793968..c67377b59f 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt @@ -781,7 +781,7 @@ Note that permanent location is a code, and location may be an authval. [% FOREACH filesOption IN filesOptions %] - + [% END %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/downloadshelf.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/downloadshelf.tt index 740fe5d1f0..772ac50ab8 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/downloadshelf.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/downloadshelf.tt @@ -37,7 +37,7 @@ [% END %] [% FOREACH xsl_export IN xsl_exports %] - + [% END %] diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-detail-sidebar.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-detail-sidebar.inc index 1d034d3714..da7d4f7bb3 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-detail-sidebar.inc +++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-detail-sidebar.inc @@ -80,7 +80,7 @@ [% ELSE %] [% FOREACH filesOption IN filesOptions %] -
  • [% filesOption.filename %]
  • +
  • [% filesOption.filename | html %]
  • [% END %] [% END %] [% END %] diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-downloadcart.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-downloadcart.tt index 70c3beb1a3..2bd1215ebc 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-downloadcart.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-downloadcart.tt @@ -21,7 +21,7 @@ [% END %] [% FOREACH xsl_export IN xsl_exports %] - + [% END %]
    diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-downloadshelf.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-downloadshelf.tt index 4881ea7aa9..411168ea29 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-downloadshelf.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-downloadshelf.tt @@ -60,7 +60,7 @@ [% END %] [% FOREACH xsl_export IN xsl_exports %] - + [% END %] Required -- 2.11.0