From 27cb433a21ef3540e5e6f505fc9aa1783551a01b Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Wed, 26 Feb 2020 11:41:39 +0100 Subject: [PATCH] Bug 4461: Redirect to 404 if KohaAdminEmailAddress is not defined Signed-off-by: Martin Renvoize --- .../intranet-tmpl/prog/en/modules/admin/preferences/opac.pref | 2 ++ opac/opac-reportproblem.pl | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref index 52d000d715..99e17e7660 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref @@ -376,6 +376,8 @@ OPAC: yes: Allow no: "Don't allow" - patrons to submit problem reports for OPAC pages to the library or Koha Administrator. + - "
" + - "NOTE: You must have KohaAdminEmailAddress enabled." - - pref: opacuserlogin choices: diff --git a/opac/opac-reportproblem.pl b/opac/opac-reportproblem.pl index 9934ccc6b8..e12c5d5562 100644 --- a/opac/opac-reportproblem.pl +++ b/opac/opac-reportproblem.pl @@ -40,7 +40,9 @@ my ( $template, $borrowernumber, $cookie ) = get_template_and_user( } ); -if ( !C4::Context->preference('OPACReportProblem') ){ +if ( !C4::Context->preference('OPACReportProblem') + || !C4::Context->preference('KohaAdminEmailAddress') ) +{ print $input->redirect("/cgi-bin/koha/errors/404.pl"); } -- 2.20.1