From 1087b8758b06a7e8ebbb826868c9887473eb2566 Mon Sep 17 00:00:00 2001 From: Pedro Amorim Date: Thu, 8 Feb 2024 12:07:27 +0000 Subject: [PATCH] Bug 36039: PoC continuing from discussion in bug 34063. Test plan: 1) Apply patch 2) Install new dep: sudo cpanm HTML::TextToHTML 3) Restart plack and access /cgi-bin/koha/about.pl?tab=database --- about.pl | 7 +++++++ koha-tmpl/intranet-tmpl/prog/en/modules/about.tt | 5 +++++ 2 files changed, 12 insertions(+) diff --git a/about.pl b/about.pl index 48ae7c989b5..40bceaaa22e 100755 --- a/about.pl +++ b/about.pl @@ -906,4 +906,11 @@ if ( open( my $file, "<:encoding(UTF-8)", "$docdir" . "/history.txt" ) ) { } } +if ( $tab eq 'database' ) { + use HTML::TextToHTML; + my $t = `./misc/maintenance/audit_database.pl`; + my $conv = new HTML::TextToHTML(); + $template->param( database_audit => $conv->process_chunk($t) ); +} + output_html_with_http_headers $query, $cookie, $template->output; diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt index 997863f2e66..bef56f4fea9 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt @@ -41,6 +41,7 @@ [% WRAPPER tab_item_link link = "translations" bt_active = tab == "translations" %] Translations [% END %] [% WRAPPER tab_item_link link = "history" bt_active = tab == "history" %] Timeline [% END %] [% WRAPPER tab_item_link link = "dedications" bt_active = tab == "dedications" %] Dedications [% END %] + [% WRAPPER tab_item_link link = "database" bt_active = tab == "database" %] Database audit [% END %] [% END %] [% WRAPPER tab_panels %] @@ -1317,6 +1318,10 @@ mother of Simon and Jeremy, and grandmother of Ben, Toby, Anna, Charlotte and Billy.

[% END # tab=dedications %] + [% IF tab == 'database' %] +

Database audit

+ [% database_audit %] + [% END # tab=database %] [% END %] [% END # /WRAPPER abouttabs %] -- 2.30.2