Bug 23329: Move error page to its own subroutine
[koha-equinox.git] / errors / 404.pl
index e5870ad..6d57df9 100755 (executable)
 
 use Modern::Perl;
 use CGI qw ( -utf8 );
-use C4::Auth;
 use C4::Output;
-use C4::Context;
 
 my $query = CGI->new;
-my $admin = C4::Context->preference('KohaAdminEmailAddress');
-my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
-    {
-        template_name   => 'errors/errorpage.tt',
-        query           => $query,
-        type            => 'intranet',
-        authnotrequired => 1,
-        debug           => 1,
-    }
-);
-$template->param (
-    admin => $admin,
-    errno => 404,
-);
-output_with_http_headers $query, $cookie, $template->output, 'html', '404 Not Found';
+output_error( $query, '404' );