From 842c70bf3098c38fb0c711bffe292b7ccb848487 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. New: Shows error message in Tab Server Information if Zebra server is not started (...and changes added...) Suggestions for other values to add are welcome. --- about.pl | 18 ++++++++++++++ koha-tmpl/intranet-tmpl/prog/en/modules/about.tt | 27 ++++++++++++++++++++++ 2 files changed, 45 insertions(+), 0 deletions(-) diff --git a/about.pl b/about.pl index 7189a22..80efea9 100755 --- a/about.pl +++ b/about.pl @@ -60,6 +60,18 @@ $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 ); + +my $errZebraConnection = C4::Context->Zconn("biblioserver",0)->errcode(); + $template->param( kohaVersion => $kohaVersion, osVersion => $osVersion, @@ -69,6 +81,12 @@ $template->param( mysqlVersion => $mysqlVersion, apacheVersion => $apacheVersion, zebraVersion => $zebraVersion, + prefNoZebra => $prefNoZebra, + prefBiblioAddsAuthorities => $prefBiblioAddsAuthorities, + prefAutoCreateAuthorities => $prefAutoCreateAuthorities, + warnPrefBiblioAddsAuthorities => $warnPrefBiblioAddsAuthorities, + warnPrefEasyAnalyticalRecords => $warnPrefEasyAnalyticalRecords, + errZebraConnection => $errZebraConnection, ); 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..a878d50 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 @@