From 9f231c4dd907f6187488fd38549b4c9d95fb6693 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 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. Signed-off-by: Chris Cormack Signed-off-by: Paul Poulain --- about.pl | 18 +++++++++++++ .../intranet-tmpl/prog/en/modules/about.tt | 27 +++++++++++++++++++ 2 files changed, 45 insertions(+) diff --git a/about.pl b/about.pl index 9295b33b46..daf682950f 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 c383a7bfdb..34f6578b3e 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 @@
  • Server Information
  • Perl modules
  • +
  • System information
  • Koha Team
  • Licenses
  • Translations
  • @@ -48,6 +49,11 @@ MySQL version: [% mysqlVersion |html %] Apache version: [% apacheVersion |html %] Zebra version: [% zebraVersion |html %] + [% IF (errZebraConnection == 10000) %] + Error Zebra server seems not to be available. Is it started? + [% ELSIF (errZebraConnection) %] + Warning Error message from Zebra: [% ( errZebraConnection ) %] + [% END %]
    @@ -90,6 +96,27 @@ [% END %]
    + +
    +

    Warnings regarding the system configuration

    + [% IF ( (prefNoZebra) || (warnPrefBiblioAddsAuthorities) || warnPrefEasyAnalyticalRecords ) %] + + + [% IF (prefNoZebra) %] + + [% END %] + [% IF (warnPrefBiblioAddsAuthorities) %] + + [% END %] + [% IF (warnPrefEasyAnalyticalRecords) %] + + [% END %] +
    Preferences
    Warning System preference 'nozebra' set. Deprectated!
    Warning System preference 'AutoCreateAuthorities' set, but needs 'BiblioAddsAuthorities' set as well.
    Warning System preference 'EasyAnalyticalRecords' set, but UseControlNumber preference is set to 'Use'. Set it to 'Don't use' or else the 'Show analytics' links in the staff client and the OPAC will be broken.
    + [% ELSE %] +

    No warnings

    + [% END %] +
    +

    Special thanks to the following organizations

      -- 2.39.5