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 "Cache redirects from Special:Redirect"
[lhc/web/wiklou.git]
/
includes
/
installer
/
WebInstallerOutput.php
diff --git
a/includes/installer/WebInstallerOutput.php
b/includes/installer/WebInstallerOutput.php
index
dd76ce9
..
b061d0d
100644
(file)
--- a/
includes/installer/WebInstallerOutput.php
+++ b/
includes/installer/WebInstallerOutput.php
@@
-21,6
+21,8
@@
* @ingroup Deployment
*/
* @ingroup Deployment
*/
+use MediaWiki\MediaWikiServices;
+
/**
* Output class modelled on OutputPage.
*
/**
* Output class modelled on OutputPage.
*
@@
-31,6
+33,7
@@
*
* @ingroup Deployment
* @since 1.17
*
* @ingroup Deployment
* @since 1.17
+ * @private
*/
class WebInstallerOutput {
*/
class WebInstallerOutput {
@@
-89,17
+92,18
@@
class WebInstallerOutput {
/**
* @param string $text
/**
* @param string $text
- * @deprecated since 1.32; use addWikiTextInterface instead
+ * @deprecated since 1.32; use addWikiText
As
Interface instead
*/
public function addWikiText( $text ) {
wfDeprecated( __METHOD__, '1.32' );
*/
public function addWikiText( $text ) {
wfDeprecated( __METHOD__, '1.32' );
- $this->addWikiTextInterface( $text );
+ $this->addWikiText
As
Interface( $text );
}
/**
* @param string $text
}
/**
* @param string $text
+ * @since 1.32
*/
*/
- public function addWikiTextInterface( $text ) {
+ public function addWikiText
As
Interface( $text ) {
$this->addHTML( $this->parent->parse( $text ) );
}
$this->addHTML( $this->parent->parse( $text ) );
}
@@
-145,7
+149,7
@@
class WebInstallerOutput {
'mediawiki.skinning.interface',
];
'mediawiki.skinning.interface',
];
- $resourceLoader =
new
ResourceLoader();
+ $resourceLoader =
MediaWikiServices::getInstance()->get
ResourceLoader();
if ( file_exists( "$wgStyleDirectory/Vector/skin.json" ) ) {
// Force loading Vector skin if available as a fallback skin
if ( file_exists( "$wgStyleDirectory/Vector/skin.json" ) ) {
// Force loading Vector skin if available as a fallback skin
@@
-165,7
+169,7
@@
class WebInstallerOutput {
$rlContext = new ResourceLoaderContext( $resourceLoader, new FauxRequest( [
'debug' => 'true',
$rlContext = new ResourceLoaderContext( $resourceLoader, new FauxRequest( [
'debug' => 'true',
- 'lang' => $this->getLanguageCode(),
+ 'lang' => $this->getLanguage
()->get
Code(),
'only' => 'styles',
] ) );
'only' => 'styles',
] ) );
@@
-196,7
+200,7
@@
class WebInstallerOutput {
* @return string
*/
private function getCssUrl() {
* @return string
*/
private function getCssUrl() {
- return Html::linkedStyle( $
_SERVER['PHP_SELF'] . '?css=1'
);
+ return Html::linkedStyle( $
this->parent->getUrl( [ 'css' => 1 ] )
);
}
public function useShortHeader( $use = true ) {
}
public function useShortHeader( $use = true ) {
@@
-219,21
+223,13
@@
class WebInstallerOutput {
}
/**
}
/**
- * @return string
- */
- public function getDir() {
- global $wgLang;
-
- return is_object( $wgLang ) ? $wgLang->getDir() : 'ltr';
- }
-
- /**
- * @return string
+ * @since 1.33
+ * @return Language
*/
*/
- p
ublic function getLanguageCod
e() {
+ p
rivate function getLanguag
e() {
global $wgLang;
global $wgLang;
- return is_object( $wgLang ) ? $wgLang
->getCode() : 'en'
;
+ return is_object( $wgLang ) ? $wgLang
: Language::factory( 'en' )
;
}
/**
}
/**
@@
-241,8
+237,8
@@
class WebInstallerOutput {
*/
public function getHeadAttribs() {
return [
*/
public function getHeadAttribs() {
return [
- 'dir' => $this->getDir(),
- 'lang' =>
LanguageCode::bcp47( $this->getLanguageCode()
),
+ 'dir' => $this->get
Language()->get
Dir(),
+ 'lang' =>
$this->getLanguage()->getHtmlCode(
),
];
}
];
}
@@
-286,7
+282,7
@@
class WebInstallerOutput {
<?php echo Html::linkedScript( 'config.js' ) . "\n"; ?>
</head>
<?php echo Html::linkedScript( 'config.js' ) . "\n"; ?>
</head>
-<?php echo Html::openElement( 'body', [ 'class' => $this->getDir() ] ) . "\n"; ?>
+<?php echo Html::openElement( 'body', [ 'class' => $this->get
Language()->get
Dir() ] ) . "\n"; ?>
<div id="mw-page-base"></div>
<div id="mw-head-base"></div>
<div id="content" class="mw-body">
<div id="mw-page-base"></div>
<div id="mw-head-base"></div>
<div id="content" class="mw-body">