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 "Add Special:Randomrootpage (from RandomRootPage extension)"
[lhc/web/wiklou.git]
/
img_auth.php
diff --git
a/img_auth.php
b/img_auth.php
index
55f17ac
..
8859141
100644
(file)
--- a/
img_auth.php
+++ b/
img_auth.php
@@
-39,7
+39,6
@@
define( 'MW_NO_OUTPUT_COMPRESSION', 1 );
require __DIR__ . '/includes/WebStart.php';
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.
# Set action base paths so that WebRequest::getPathInfo()
# recognizes the "X" as the 'title' in ../img_auth.php/X urls.
@@
-47,11
+46,9
@@
$wgArticlePath = false; # Don't let a "/*" article path clober our action path
$wgActionPaths = array( "$wgUploadPath/" );
wfImageAuthMain();
$wgActionPaths = array( "$wgUploadPath/" );
wfImageAuthMain();
-wfLogProfilingData();
-// Commit and close up!
-$factory = wfGetLBFactory();
-$factory->commitMasterChanges();
-$factory->shutdown();
+
+$mediawiki = new MediaWiki();
+$mediawiki->doPostOutputShutdown( 'fast' );
function wfImageAuthMain() {
global $wgImgAuthUrlPathMap;
function wfImageAuthMain() {
global $wgImgAuthUrlPathMap;
@@
-152,7
+149,7
@@
function wfImageAuthMain() {
// Run hook for extension authorization plugins
/** @var $result array */
$result = null;
// Run hook for extension authorization plugins
/** @var $result array */
$result = null;
- if ( !
wfRunHooks
( 'ImgAuthBeforeStream', array( &$title, &$path, &$name, &$result ) ) ) {
+ if ( !
Hooks::run
( 'ImgAuthBeforeStream', array( &$title, &$path, &$name, &$result ) ) ) {
wfForbidden( $result[0], $result[1], array_slice( $result, 2 ) );
return;
}
wfForbidden( $result[0], $result[1], array_slice( $result, 2 ) );
return;
}
@@
-198,11
+195,16
@@
function wfForbidden( $msg1, $msg2 ) {
wfMessage( $msg2, $args )->inLanguage( 'en' )->text()
);
wfMessage( $msg2, $args )->inLanguage( 'en' )->text()
);
-
header( 'HTTP/1.0 403 Forbidden'
);
+
HttpStatus::header( 403
);
header( 'Cache-Control: no-cache' );
header( 'Content-Type: text/html; charset=utf-8' );
echo <<<ENDS
header( 'Cache-Control: no-cache' );
header( 'Content-Type: text/html; charset=utf-8' );
echo <<<ENDS
+<!DOCTYPE html>
<html>
<html>
+<head>
+<meta charset="UTF-8" />
+<title>$msgHdr</title>
+</head>
<body>
<h1>$msgHdr</h1>
<p>$detailMsg</p>
<body>
<h1>$msgHdr</h1>
<p>$detailMsg</p>