From 202a2c43817a2f0c6039c43ca1f0edd2dc4a72f2 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Wed, 19 Sep 2012 09:59:59 +0200 Subject: [PATCH] But 8787: don't load the page if OpacMaintenance is ON If the syspref OpacMaintenance is ON, it is useless to loaded the requested page. To test: - switch on the syspref OpacMaintenace - check in your apache access log, zebra log, etc. the requested page is not loaded (i.e. on the opac-search.pl page) Signed-off-by: Marc Veron Checked by watching other_vhosts_access.log Works as expected Signed-off-by: Paul Poulain Signed-off-by: Chris Cormack Signed-off-by: Liz Rea - Catalyst --- C4/Auth.pm | 1 + 1 file changed, 1 insertion(+) diff --git a/C4/Auth.pm b/C4/Auth.pm index f9213f2ab7..e9a9970f11 100644 --- a/C4/Auth.pm +++ b/C4/Auth.pm @@ -589,6 +589,7 @@ sub _version_check ($$) { if (C4::Context->preference('OpacMaintenance') && $type eq 'opac') { warn "OPAC Install required, redirecting to maintenance"; print $query->redirect("/cgi-bin/koha/maintenance.pl"); + safe_exit; } unless ( $version = C4::Context->preference('Version') ) { # assignment, not comparison if ( $type ne 'opac' ) { -- 2.39.5