Bug 19382: Add ability to block guarantees based on fees owed by guarantor and other...
[koha-ffzg.git] / about.pl
index 56037c8..68abd8c 100755 (executable)
--- a/about.pl
+++ b/about.pl
@@ -43,7 +43,9 @@ use C4::Installer::PerlModules;
 use Koha;
 use Koha::DateUtils qw(dt_from_string output_pref);
 use Koha::Acquisition::Currencies;
+use Koha::BackgroundJob;
 use Koha::BiblioFrameworks;
+use Koha::Email;
 use Koha::Patron::Categories;
 use Koha::Patrons;
 use Koha::Caches;
@@ -196,6 +198,8 @@ my $warnPrefAnonymousPatronAnonSuggestions_PatronDoesNotExist = ( $AnonymousPatr
 
 my $warnPrefAnonymousPatronOPACPrivacy_PatronDoesNotExist = ( not $anonymous_patron and Koha::Patrons->search({ privacy => 2 })->count );
 
+my $warnPrefKohaAdminEmailAddress = not Email::Valid->address(C4::Context->preference('KohaAdminEmailAddress'));
+
 my $errZebraConnection = C4::Context->Zconn("biblioserver",0)->errcode();
 
 my $warnIsRootUser   = (! $loggedinuser);
@@ -552,6 +556,17 @@ $template->param( 'bad_yaml_prefs' => \@bad_yaml_prefs ) if @bad_yaml_prefs;
     $template->param( warnHiddenBiblionumbers => \@hidden_biblionumbers );
 }
 
+{
+    # BackgroundJob - test connection to message broker
+    eval {
+        Koha::BackgroundJob->connect;
+    };
+    if ( $@ ) {
+        warn $@;
+        $template->param( warnConnectBroker => $@ );
+    }
+}
+
 my %versions = C4::Context::get_versions();
 
 $template->param(
@@ -571,6 +586,7 @@ $template->param(
     warnPrefAnonymousPatronAnonSuggestions    => $warnPrefAnonymousPatronAnonSuggestions,
     warnPrefAnonymousPatronOPACPrivacy_PatronDoesNotExist     => $warnPrefAnonymousPatronOPACPrivacy_PatronDoesNotExist,
     warnPrefAnonymousPatronAnonSuggestions_PatronDoesNotExist => $warnPrefAnonymousPatronAnonSuggestions_PatronDoesNotExist,
+    warnPrefKohaAdminEmailAddress => $warnPrefKohaAdminEmailAddress,
     errZebraConnection => $errZebraConnection,
     warnIsRootUser => $warnIsRootUser,
     warnNoActiveCurrency => $warnNoActiveCurrency,