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
Stop calling FileRepo->streamFile()
[lhc/web/wiklou.git]
/
includes
/
actions
/
RawAction.php
diff --git
a/includes/actions/RawAction.php
b/includes/actions/RawAction.php
index
73594bc
..
14f7603
100644
(file)
--- a/
includes/actions/RawAction.php
+++ b/
includes/actions/RawAction.php
@@
-27,6
+27,7
@@
*/
use MediaWiki\Logger\LoggerFactory;
*/
use MediaWiki\Logger\LoggerFactory;
+use MediaWiki\MediaWikiServices;
/**
* A simple method to retrieve the plain source of an article,
/**
* A simple method to retrieve the plain source of an article,
@@
-116,10
+117,10
@@
class RawAction extends FormlessAction {
$elevatedText = $elevated ? 'by elevated ' : '';
$log = LoggerFactory::getInstance( "security" );
$log->warning(
$elevatedText = $elevated ? 'by elevated ' : '';
$log = LoggerFactory::getInstance( "security" );
$log->warning(
- "Unsafe JS/CSS/Json
$elevatedText" . "
load - {user} loaded {title} with {ctype}",
+ "Unsafe JS/CSS/Json
{$elevatedText}
load - {user} loaded {title} with {ctype}",
[
'user' => $this->getUser()->getName(),
[
'user' => $this->getUser()->getName(),
- 'title' => $title->getPrefixedDB
K
ey(),
+ 'title' => $title->getPrefixedDB
k
ey(),
'ctype' => $contentType,
'elevated' => $elevated
]
'ctype' => $contentType,
'elevated' => $elevated
]
@@
-147,7
+148,7
@@
class RawAction extends FormlessAction {
$log->info( "Blocked loading unprotected JS {title} for {user}",
[
'user' => $this->getUser()->getName(),
$log->info( "Blocked loading unprotected JS {title} for {user}",
[
'user' => $this->getUser()->getName(),
- 'title' => $title->getPrefixedDB
K
ey(),
+ 'title' => $title->getPrefixedDB
k
ey(),
]
);
throw new HttpError( 403, wfMessage( 'unprotected-js' ) );
]
);
throw new HttpError( 403, wfMessage( 'unprotected-js' ) );
@@
-181,8
+182,6
@@
class RawAction extends FormlessAction {
* @return string|bool
*/
public function getRawText() {
* @return string|bool
*/
public function getRawText() {
- global $wgParser;
-
$text = false;
$title = $this->getTitle();
$request = $this->getRequest();
$text = false;
$title = $this->getTitle();
$request = $this->getRequest();
@@
-221,7
+220,7
@@
class RawAction extends FormlessAction {
}
if ( $text !== false && $text !== '' && $request->getRawVal( 'templates' ) === 'expand' ) {
}
if ( $text !== false && $text !== '' && $request->getRawVal( 'templates' ) === 'expand' ) {
- $text =
$wgParser
->preprocess(
+ $text =
MediaWikiServices::getInstance()->getParser()
->preprocess(
$text,
$title,
ParserOptions::newFromContext( $this->getContext() )
$text,
$title,
ParserOptions::newFromContext( $this->getContext() )