From 6058ffc52b325010f76c8aed24018524756a5da0 Mon Sep 17 00:00:00 2001 From: Marc Veron Date: Sun, 24 Jun 2012 21:29:12 +0200 Subject: [PATCH] Bug 8301 - Display additional system information (preferences) on About page to minimize support cases Content-Type: text/plain; charset="utf-8" To minimize support questions regarding common mistakes, the About page should have an additional tab that displays warnings if depractated and/or mutual excluding system preferences are used. To test patch use values as displayed on screenshot attached. Sugestions for other values to add are welcome. --- about.pl | 15 +++++++++++++++ koha-tmpl/intranet-tmpl/prog/en/modules/about.tt | 22 ++++++++++++++++++++++ 2 files changed, 37 insertions(+), 0 deletions(-) diff --git a/about.pl b/about.pl index 7189a22..a0e2020 100755 --- a/about.pl +++ b/about.pl @@ -60,6 +60,16 @@ $apacheVersion = `httpd2 -v` unless $apacheVersion; $apacheVersion = (`/usr/sbin/apache2 -V`)[0] unless $apacheVersion; my $zebraVersion = `zebraidx -V`; +# Additional system information for warnings +my $prefNoZebra = C4::Context->preference('nozebra'); +my $prefAutoCreateAuthorities = C4::Context->preference('AutoCreateAuthorities'); +my $prefBiblioAddsAuthorities = C4::Context->preference('BiblioAddsAuthorities'); +my $warnPrefBiblioAddsAuthorities = ( $prefAutoCreateAuthorities && ( !$prefBiblioAddsAuthorities) ); + +my $prefEasyAnalyticalRecords = C4::Context->preference('EasyAnalyticalRecords'); +my $prefUseControlNumber = C4::Context->preference('UseControlNumber'); +my $warnPrefEasyAnalyticalRecords = ( $prefEasyAnalyticalRecords && $prefUseControlNumber ); + $template->param( kohaVersion => $kohaVersion, osVersion => $osVersion, @@ -69,6 +79,11 @@ $template->param( mysqlVersion => $mysqlVersion, apacheVersion => $apacheVersion, zebraVersion => $zebraVersion, + prefNoZebra => $prefNoZebra, + prefBiblioAddsAuthorities => $prefBiblioAddsAuthorities, + prefAutoCreateAuthorities => $prefAutoCreateAuthorities, + warnPrefBiblioAddsAuthorities => $warnPrefBiblioAddsAuthorities, + warnPrefEasyAnalyticalRecords => $warnPrefEasyAnalyticalRecords, ); my @components = (); diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt index 2fd6655..842d3ea 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt @@ -26,6 +26,7 @@