Bug 30543: Decouple DumpSearchQueryTemplate from other tempalte dump preferences

To test:
1 - Enable DumpSearchQueryTemplate
2 - Confirm you can find the search query in the HTML as a comment
3 - Enable other template dump preference
4 - Confirm they work as before
5 - Confirm new description of preference makes sense

Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
Nick Clemens 2022-04-14 13:18:30 +00:00 committed by Tomas Cohen Arazi
parent 9d527ad8a4
commit 0fce4ba81d
No known key found for this signature in database
GPG Key ID: 0A272EA1B2F3C15F
3 changed files with 17 additions and 3 deletions

View File

@ -3,10 +3,17 @@
[% USE Koha %]
[% USE raw %]
[% USE Dumper( Indent=1, SortKeys=1 ) %]
[% IF Koha.Preference('DumpSearchQueryTemplate') %]
<!-- SearchQuery
[% Dumper.dump( search_query ) | $raw %]
-->
[% END %]
[% IF Koha.Preference('DumpTemplateVarsIntranet') %]
[% TRY %]
[% USE Stash %]
[% USE Dumper( Indent=1, SortKeys=1 ) %]
<!--
[% FILTER replace('<!--', '<!- -') %]
[% FILTER replace('-->', '- ->') %]

View File

@ -133,4 +133,4 @@ Logging:
choices:
1: Do
0: "Don't"
- dump search query as a template parameter, requires <a href="/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=DumpTemplateVars">DumpTemplateVars</a>[interface] to be visible.
- dump search query to a comment in the HTML source for the OPAC and staff interface.

View File

@ -3,10 +3,17 @@
[% USE raw %]
[% USE Koha %]
[% USE Dumper( Indent=1, SortKeys=1 ) %]
[% IF Koha.Preference('DumpSearchQueryTemplate') %]
<!-- SearchQuery
[% Dumper.dump( search_query ) | $raw %]
-->
[% END %]
[% IF Koha.Preference('DumpTemplateVarsOpac') %]
[% TRY %]
[% USE Stash %]
[% USE Dumper ( Indent=1, SortKeys=1 ) %]
<!--
[% FILTER replace('<!--', '<!- -') %]
[% FILTER replace('-->', '- ->') %]