use CGI qw ( -utf8 );
use C4::Auth;
-use C4::Output;
+use C4::Output qw( output_html_with_http_headers );
use C4::Templates qw/gettemplate/;
-my $query = new CGI;
-my $template = C4::Templates::gettemplate( 'maintenance.tt', 'opac', $query, 0 );
+use Koha;
+
+my $query = CGI->new;
+my $template = C4::Templates::gettemplate( 'maintenance.tt', 'opac', $query );
my $koha_db_version = C4::Context->preference('Version');
-my $kohaversion = C4::Context::KOHAVERSION;
+my $kohaversion = Koha::version();
# Strip dots from version
$kohaversion =~ s/\.//g if defined $kohaversion;
$koha_db_version =~ s/\.//g if defined $koha_db_version;
print $query->redirect("/cgi-bin/koha/opac-main.pl");
}
-1;
\ No newline at end of file
+1;