89 $this->contents .= $html;
98 $this->
addHTML( $this->parent->parse( $text ) );
105 $this->contents .= $html;
115 throw new MWException( __METHOD__ .
' called after sending headers' );
117 $this->redirectTarget = $url;
123 if ( !$this->redirectTarget ) {
135 'mediawiki.skinning.interface',
136 'mediawiki.legacy.config'
139 $resourceLoader = MediaWikiServices::getInstance()->getResourceLoader();
148 foreach ( $moduleNames as $moduleName ) {
150 $module = $resourceLoader->getModule( $moduleName );
151 '@phan-var ResourceLoaderFileModule $module';
159 $module->readStyleFiles(
160 $module->getStyleFiles( $rlContext ),
165 return implode(
"\n", $styles );
174 return Html::linkedStyle( $this->parent->getUrl( [
'css' => 1 ] ) );
189 if ( !$this->redirectTarget && strlen( $this->contents ) ) {
192 $this->contents =
'';
204 : MediaWikiServices::getInstance()->getLanguageFactory()->getLanguage(
'en' );
228 $this->parent->request->response()->header(
'Content-Type: text/html; charset=utf-8' );
231 $this->parent->request->response()->header(
'X-Frame-Options: DENY' );
234 if ( $this->redirectTarget ) {
235 $this->parent->request->response()->header(
'Location: ' . $this->redirectTarget );
250 <meta name=
"robots" content=
"noindex, nofollow" />
251 <meta http-equiv=
"Content-type" content=
"text/html; charset=utf-8" />
255 <?php echo Html::linkedScript(
'config.js' ) .
"\n"; ?>
258<?php echo Html::openElement(
'body', [
'class' => $this->
getLanguage()->getDir() ] ) .
"\n"; ?>
259<div
id=
"mw-page-base"></div>
260<div
id=
"mw-head-base"></div>
261<div
id=
"content" class=
"mw-body" role=
"main">
262<div
id=
"bodyContent" class=
"mw-body-content">
270 echo Html::closeElement(
'body' ) . Html::closeElement(
'html' );
279 <div
class=
"portal" id=
"p-logo">
280 <a href=
"https://www.mediawiki.org/" title=
"Main Page"></a>
283 $message =
wfMessage(
'config-sidebar' )->plain();
286 foreach ( explode(
'----', $message ) as $section ) {
287 echo
'<div class="portal"><div class="body">';
288 echo $this->parent->parse( $section,
true );
292 echo
'<div class="portal"><div class="body"><ul>';
294 'config-sidebar-relnotes' =>
'ReleaseNotes',
295 'config-sidebar-license' =>
'Copying',
296 'config-sidebar-upgrade' =>
'UpgradeDoc',
297 ] as $msgKey => $pageName ) {
298 echo $this->parent->makeLinkItem(
299 $this->parent->getDocUrl( $pageName ),
303 echo
'</ul></div></div>';
308 echo Html::closeElement(
'body' ) . Html::closeElement(
'html' );
316 <meta name=
"robots" content=
"noindex, nofollow" />
317 <meta http-equiv=
"Content-type" content=
"text/html; charset=utf-8" />
321 <?php echo Html::linkedScript(
'config.js' ) .
"\n"; ?>
324<body style=
"background-image: none">
336 return Html::linkedScript(
"../resources/lib/jquery/jquery.js" );
const MW_VERSION
The running version of MediaWiki.
wfMessage( $key,... $params)
This is the function for getting translated interface messages.
WebRequest clone which takes values from a provided array.
Context object that contains information about the state of a specific ResourceLoader web request.
static makeCombinedStyles(array $stylePairs)
Combines an associative array mapping media type to CSS into a single stylesheet with "@media" blocks...
Output class modelled on OutputPage.
addWikiTextAsInterface( $text)
bool $useShortHeader
Whether to use the limited header (used during CC license callbacks)
__construct(WebInstaller $parent)
string $contents
Buffered contents that haven't been output yet.
getCssUrl()
"<link>" to index.php?css=1 for the "<head>"
useShortHeader( $use=true)
getCSS()
Get the stylesheet of the MediaWiki skin.
bool $allowFrames
Does the current page need to allow being used as a frame? If not, X-Frame-Options will be output to ...
WebInstaller $parent
The WebInstaller object this WebInstallerOutput is used by.
bool $headerDone
Has the header (or short header) been output?
headerDone()
Get whether the header has been output.
allowFrames( $allow=true)
Class for the core installer web interface.