- /**
- * Send headers and output the beginning of the html page if not using
- * $wgOut to output the exception.
- * @deprecated since 1.18 call wfDie() if you need to die immediately
- */
- function htmlHeader() {
- global $wgLogo, $wgLang;
-
- if ( !headers_sent() ) {
- header( 'HTTP/1.0 500 Internal Server Error' );
- header( 'Content-type: text/html; charset=UTF-8' );
- /* Don't cache error pages! They cause no end of trouble... */
- header( 'Cache-control: none' );
- header( 'Pragma: nocache' );
- }
-
- $head = Html::element( 'title', null, $this->getPageTitle() ) . "\n";
- $head .= Html::inlineStyle( <<<ENDL
- body {
- color: #000;
- background-color: #fff;
- font-family: sans-serif;
- padding: 2em;
- text-align: center;
- }
- p, img, h1 {
- text-align: left;
- margin: 0.5em 0;
- }
- h1 {
- font-size: 120%;
- }
-ENDL
- );
-
- $dir = 'ltr';
- $code = 'en';
-
- if ( $wgLang instanceof Language ) {
- $dir = $wgLang->getDir();
- $code = $wgLang->getCode();
- }
-
- $header = Html::element( 'img', array(
- 'src' => $wgLogo,
- 'alt' => '' ) );
-
- $attribs = array( 'dir' => $dir, 'lang' => $code );
-
- return
- Html::htmlHeader( $attribs ) .
- Html::rawElement( 'head', null, $head ) . "\n".
- Html::openElement( 'body' ) . "\n" .
- $header . "\n";
- }
-
- /**
- * print the end of the html page if not using $wgOut.
- * @deprecated since 1.18
- */
- function htmlFooter() {
- return Html::closeElement( 'body' ) . Html::closeElement( 'html' );
- }
-