From 52145c158918b3017f3e1a0a2b9bfbcc9f112755 Mon Sep 17 00:00:00 2001 From: Joshua Ferraro Date: Mon, 14 Jul 2008 11:01:44 -0500 Subject: [PATCH] Fix for bug 2115: OpacMaintenance wasn't working --- C4/Auth.pm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/C4/Auth.pm b/C4/Auth.pm index 99e5d3d8b3..8ccaf61781 100755 --- a/C4/Auth.pm +++ b/C4/Auth.pm @@ -427,7 +427,11 @@ sub _version_check ($$) { my $version; # If Version syspref is unavailable, it means Koha is beeing installed, # and so we must redirect to OPAC maintenance page or to the WebInstaller - #warn "about to check version"; + # also, if OpacMaintenance is ON, OPAC should redirect to maintenance + if (C4::Context->preference('OpacMaintenance') && $type eq 'opac') { + warn "OPAC Install required, redirecting to maintenance"; + print $query->redirect("/cgi-bin/koha/maintenance.pl"); + } unless ($version = C4::Context->preference('Version')) { # assignment, not comparison if ($type ne 'opac') { warn "Install required, redirecting to Installer"; -- 2.39.5