Fixing broken templates, and broken links
[srvgit] / mainpage.pl
index 5ca4a0f..b943549 100755 (executable)
@@ -4,7 +4,7 @@ use strict;
 require Exporter;
 use C4::Database;
 use C4::Output;  # contains gettemplate
-use C4::Charset;
+use C4::Interface::CGI::Output;
 use CGI;
 use C4::Auth;
 
@@ -18,7 +18,7 @@ my ($template, $loggedinuser, $cookie)
                             debug => 1,
                             });
 
-print  $query->header(
-   -type => guesstype($template->output),
-   -cookie => $cookie
-), $template->output;
+my $marc_p = C4::Context->boolean_preference("marc");
+$template->param(NOTMARC => !$marc_p);
+
+output_html_with_http_headers $query, $cookie, $template->output;