dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge "Localisation updates from http://translatewiki.net."
[lhc/web/wiklou.git]
/
img_auth.php
diff --git
a/img_auth.php
b/img_auth.php
index
b04974b
..
667a40a
100644
(file)
--- a/
img_auth.php
+++ b/
img_auth.php
@@
-40,11
+40,7
@@
*/
define( 'MW_NO_OUTPUT_COMPRESSION', 1 );
*/
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()
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
// 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;
// This is a public wiki, so disable this script (for private wikis only)
wfForbidden( 'img-auth-accessdenied', 'img-auth-public' );
return;
@@
-106,7
+102,7
@@
function wfImageAuthMain() {
// Check to see if the file exists
if ( !$repo->fileExists( $filename ) ) {
// Check to see if the file exists
if ( !$repo->fileExists( $filename ) ) {
- wfForbidden( 'img-auth-accessdenied','img-auth-nofile', $filename );
+ wfForbidden( 'img-auth-accessdenied',
'img-auth-nofile', $filename );
return;
}
return;
}
@@
-130,7
+126,7
@@
function wfImageAuthMain() {
}
// Stream the requested file
}
// Stream the requested file
- wfDebugLog( 'img_auth', "Streaming `"
.$filename.
"`." );
+ wfDebugLog( 'img_auth', "Streaming `"
. $filename .
"`." );
$repo->streamFile( $filename, array( 'Cache-Control: private', 'Vary: Cookie' ) );
}
$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',
$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' );
);
header( 'HTTP/1.0 403 Forbidden' );