Bugzilla – Attachment 175606 Details for
Bug 38723
Move widely used TT plugins to LOAD_PLUGINS
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 38723: WIP Fix valid-templates.t
Bug-38723-WIP-Fix-valid-templatest.patch (text/plain), 1.66 KB, created by
Martin Renvoize (ashimema)
on 2024-12-17 11:59:00 UTC
(
hide
)
Description:
Bug 38723: WIP Fix valid-templates.t
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2024-12-17 11:59:00 UTC
Size:
1.66 KB
patch
obsolete
>From 106ac91efd0c6ed57e05010ac0b518f4db649d79 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Tue, 17 Dec 2024 11:57:26 +0000 >Subject: [PATCH] Bug 38723: WIP Fix valid-templates.t > >I'm not sure why/how this works.. and it doesn't resolve all issues and >will need applying to the Template calls in proper Koha and not just the >tests too I believe >--- > xt/author/valid-templates.t | 10 +++++++++- > 1 file changed, 9 insertions(+), 1 deletion(-) > >diff --git a/xt/author/valid-templates.t b/xt/author/valid-templates.t >index de93b9493c8..ca52423e701 100755 >--- a/xt/author/valid-templates.t >+++ b/xt/author/valid-templates.t >@@ -37,6 +37,8 @@ This test checks all staff and OPAC templates and includes for syntax errors > use File::Find; > use File::Spec; > use Template; >+use Template::Plugins; >+use Koha::Template::Plugin::raw; > use Test::More; > > my @themes; >@@ -121,13 +123,19 @@ sub create_template_test { > my $interface = $includes =~ s|^.*/([^/]*-tmpl).*$|$1|r; > my $theme = ($interface =~ /opac/) ? 'bootstrap' : 'prog'; > >+ my $plugins = Template::Plugins->new( { PLUGIN_BASE => 'Koha::Template::Plugin' } ); >+ > return sub { > my $tt = Template->new( > { > ABSOLUTE => 1, > INCLUDE_PATH => $includes, > PLUGIN_BASE => 'Koha::Template::Plugin', >- LOAD_PLUGINS => [ 'Koha', 'Asset', 'raw' ], >+ LOAD_PLUGINS => [ $plugins ], >+ LOAD_FILTERS => [ >+ 'Koha::Template::Plugin::raw', >+ ], >+ FILTERS => {} > } > ); > foreach my $exclusion (@exclusions) { >-- >2.47.1
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 38723
:
175601
|
175602
|
175604
|
175605
| 175606