From a1e7c2924fb05c9ddbba91f9642384f8b9a7b723 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Wed, 19 Sep 2012 09:59:59 +0200 Subject: [PATCH] [SIGNED-OFF] But 8787: don't load the page if OpacMaintenance is ON Content-Type: text/plain; charset="utf-8" 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 --- C4/Auth.pm | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/C4/Auth.pm b/C4/Auth.pm index d4ad292..dc3fb8c 100644 --- a/C4/Auth.pm +++ b/C4/Auth.pm @@ -556,6 +556,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' ) { -- 1.7.2.5