Fix for bug 2115: OpacMaintenance wasn't working

This commit is contained in:
Joshua Ferraro 2008-07-14 11:01:44 -05:00
parent 9b41cf3b3e
commit 52145c1589

View file

@ -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";