Bugzilla – Attachment 175605 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: POC LOAD_FILTERS for raw
Bug-38723-POC-LOADFILTERS-for-raw.patch (text/plain), 1.41 KB, created by
Jonathan Druart
on 2024-12-17 10:46:24 UTC
(
hide
)
Description:
Bug 38723: POC LOAD_FILTERS for raw
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2024-12-17 10:46:24 UTC
Size:
1.41 KB
patch
obsolete
>From 14639d658a1c1637c481642ece090ea6297d4400 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Tue, 17 Dec 2024 11:31:27 +0100 >Subject: [PATCH] Bug 38723: POC LOAD_FILTERS for raw > >--- > C4/Templates.pm | 3 +++ > Koha/Template/Plugin/raw.pm | 10 ++++++++-- > 2 files changed, 11 insertions(+), 2 deletions(-) > >diff --git a/C4/Templates.pm b/C4/Templates.pm >index fb7d3e5cb56..c3c7e3a1937 100644 >--- a/C4/Templates.pm >+++ b/C4/Templates.pm >@@ -77,6 +77,9 @@ sub new { > COMPILE_EXT => $use_template_cache ? '.ttc' : '', > COMPILE_DIR => $use_template_cache ? C4::Context->config('template_cache_dir') : '', > INCLUDE_PATH => \@includes, >+ LOAD_FILTERS => [ >+ 'Koha::Template::Plugin::raw', >+ ], > FILTERS => {}, > ENCODING => 'UTF-8', > } >diff --git a/Koha/Template/Plugin/raw.pm b/Koha/Template/Plugin/raw.pm >index f194a18ae2c..6e38be8be1c 100644 >--- a/Koha/Template/Plugin/raw.pm >+++ b/Koha/Template/Plugin/raw.pm >@@ -17,8 +17,7 @@ package Koha::Template::Plugin::raw; > > use Modern::Perl; > >-use Template::Plugin::Filter; >-use base qw( Template::Plugin::Filter ); >+use base 'Template::Plugin'; > > our $DYNAMIC = 1; > >@@ -27,6 +26,13 @@ sub filter { > return $text; > } > >+sub fetch { >+ my ($self) = @_; >+ return sub { >+ return shift; >+ }; >+} >+ > 1; > > =head1 NAME >-- >2.34.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