Message::inLanguage() shouldn't unstub StubUserLang
[lhc/web/wiklou.git] / img_auth.php
index 6f449c6..f44cac0 100644 (file)
@@ -39,7 +39,6 @@
 
 define( 'MW_NO_OUTPUT_COMPRESSION', 1 );
 require __DIR__ . '/includes/WebStart.php';
-wfProfileIn( 'img_auth.php' );
 
 # Set action base paths so that WebRequest::getPathInfo()
 # recognizes the "X" as the 'title' in ../img_auth.php/X urls.
@@ -114,7 +113,7 @@ function wfImageAuthMain() {
        // be under a folder that has the source file name.
        if ( $zone === 'thumb' || $zone === 'transcoded' ) {
                $name = wfBaseName( dirname( $path ) );
-               $filename = $repo->getZonePath( $zone ) . substr( $path, strlen( "/".$zone ) );
+               $filename = $repo->getZonePath( $zone ) . substr( $path, strlen( "/" . $zone ) );
                // Check to see if the file exists
                if ( !$repo->fileExists( $filename ) ) {
                        wfForbidden( 'img-auth-accessdenied', 'img-auth-nofile', $filename );
@@ -202,7 +201,12 @@ function wfForbidden( $msg1, $msg2 ) {
        header( 'Cache-Control: no-cache' );
        header( 'Content-Type: text/html; charset=utf-8' );
        echo <<<ENDS
+<!DOCTYPE html>
 <html>
+<head>
+<meta charset="UTF-8" />
+<title>$msgHdr</title>
+</head>
 <body>
 <h1>$msgHdr</h1>
 <p>$detailMsg</p>