From 24dcd5688874a0d49c4fc9ba2f717e01eb76dcb1 Mon Sep 17 00:00:00 2001 From: Pedro Amorim Date: Mon, 26 Feb 2024 16:36:29 +0000 Subject: [PATCH] Bug 36039: New 'datatabase audit' tab in about page Signed-off-by: Martin Renvoize Signed-off-by: JesseM Signed-off-by: Kyle M Hall --- about.pl | 6 ++++++ koha-tmpl/intranet-tmpl/prog/en/modules/about.tt | 13 +++++++++++++ 2 files changed, 19 insertions(+) diff --git a/about.pl b/about.pl index c2f6e6f591..de73993324 100755 --- a/about.pl +++ b/about.pl @@ -926,4 +926,10 @@ sub message_broker_check { } } +if ( $tab eq 'database' ) { + use Koha::Database::Auditor; + my $db_auditor = Koha::Database::Auditor->new( { is_cli => 0 } ); + my $audit_diff = $db_auditor->run; + $template->param( audit_diff => $audit_diff, audit_warning => $db_auditor->get_warning ); +} 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 638d717e41..2fb1c40c34 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 linktab = 1 tabname = "translations" bt_active = tab == "translations" %] Translations [% END %] [% WRAPPER tab_item linktab = 1 tabname = "history" bt_active = tab == "history" %] Timeline [% END %] [% WRAPPER tab_item linktab = 1 tabname = "dedications" bt_active = tab == "dedications" %] Dedications [% END %] + [% WRAPPER tab_item linktab = 1 tabname = "database" bt_active = tab == "database" %] Database audit [% END %] [% END %] [% WRAPPER tab_panels %] [% SWITCH tab %] @@ -52,6 +53,7 @@ [% CASE 'translations' %] [% PROCESS translations_panel %] [% CASE 'history' %] [% PROCESS history_panel %] [% CASE 'dedications' %] [% PROCESS dedications_panel %] + [% CASE 'database' %] [% PROCESS database_panel %] [% CASE %] [% PROCESS about_panel %] [% END %] [% END %] @@ -1355,3 +1357,14 @@

[% END # tab=dedications %] [% END %] + +[% BLOCK database_panel %] + [% WRAPPER tab_panel tabname= "database" bt_active = 1 %] +

Database audit

+

Run the following SQL to fix the database:

+ + [% audit_diff | html %] + +

[% audit_warning | html %]

+ [% END # tab=database %] +[% END %] \ No newline at end of file -- 2.39.5