X-Git-Url: http://git.cyclocoop.org/%28?a=blobdiff_plain;f=img_auth.php;h=667a40a5a89f6dc37e2bc7c5cdb598db086436f1;hb=761187725af7fc3547f8e431cc5da6fb45859349;hp=2f7fb390506c0a764f3de9c68aecbf75137fdde6;hpb=62a6a48bd4cde140a2bebde73f882754dfaa273b;p=lhc%2Fweb%2Fwiklou.git diff --git a/img_auth.php b/img_auth.php index 2f7fb39050..667a40a5a8 100644 --- a/img_auth.php +++ b/img_auth.php @@ -40,11 +40,7 @@ */ define( 'MW_NO_OUTPUT_COMPRESSION', 1 ); -if ( isset( $_SERVER['MW_COMPILED'] ) ) { - require ( 'core/includes/WebStart.php' ); -} else { - require ( __DIR__ . '/includes/WebStart.php' ); -} +require ( __DIR__ . '/includes/WebStart.php' ); wfProfileIn( 'img_auth.php' ); # Set action base paths so that WebRequest::getPathInfo() @@ -60,8 +56,8 @@ function wfImageAuthMain() { // See if this is a public Wiki (no protections). if ( $wgImgAuthPublicTest - && in_array( 'read', User::getGroupPermissions( array( '*' ) ), true ) ) - { + && in_array( 'read', User::getGroupPermissions( array( '*' ) ), true ) + ) { // This is a public wiki, so disable this script (for private wikis only) wfForbidden( 'img-auth-accessdenied', 'img-auth-public' ); return; @@ -130,7 +126,7 @@ function wfImageAuthMain() { } // Stream the requested file - wfDebugLog( 'img_auth', "Streaming `".$filename."`." ); + wfDebugLog( 'img_auth', "Streaming `" . $filename . "`." ); $repo->streamFile( $filename, array( 'Cache-Control: private', 'Vary: Cookie' ) ); } @@ -153,8 +149,8 @@ function wfForbidden( $msg1, $msg2 ) { $detailMsg = wfMessage( $detailMsgKey, $args )->escaped(); wfDebugLog( 'img_auth', - "wfForbidden Hdr:" . wfMessage( $msg1 )->inLanguage( 'en' )->text() . " Msg: ". - wfMessage( $msg2, $args )->inLanguage( 'en' )->text() + "wfForbidden Hdr: " . wfMessage( $msg1 )->inLanguage( 'en' )->text() . " Msg: " . + wfMessage( $msg2, $args )->inLanguage( 'en' )->text() ); header( 'HTTP/1.0 403 Forbidden' );