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 ) {
138 'mediawiki.legacy.shared',
140 'mediawiki.skinning.interface',
143 $resourceLoader = MediaWikiServices::getInstance()->getResourceLoader();
145 if ( file_exists(
"$wgStyleDirectory/Vector/skin.json" ) ) {
149 $data = $registry->readFromQueue( [
150 "$wgStyleDirectory/Vector/skin.json" => 1,
152 if ( isset( $data[
'globals'][
'wgResourceModules'] ) ) {
156 $moduleNames[] =
'skins.vector.styles';
159 $moduleNames[] =
'mediawiki.legacy.config';
168 foreach ( $moduleNames as $moduleName ) {
171 '@phan-var ResourceLoaderFileModule $module';
178 $styles = array_merge( $styles, ResourceLoader::makeCombinedStyles(
179 $module->readStyleFiles(
180 $module->getStyleFiles( $rlContext ),
181 $module->getFlip( $rlContext ),
186 return implode(
"\n", $styles );
195 return Html::linkedStyle( $this->parent->getUrl( [
'css' => 1 ] ) );
210 if ( !$this->redirectTarget && strlen( $this->contents ) ) {
213 $this->contents =
'';
224 return is_object(
$wgLang ) ?
$wgLang : Language::factory(
'en' );
248 $this->parent->request->response()->header(
'Content-Type: text/html; charset=utf-8' );
251 $this->parent->request->response()->header(
'X-Frame-Options: DENY' );
254 if ( $this->redirectTarget ) {
255 $this->parent->request->response()->header(
'Location: ' . $this->redirectTarget );
269 <meta name=
"robots" content=
"noindex, nofollow" />
270 <meta http-equiv=
"Content-type" content=
"text/html; charset=utf-8" />
274 <?php echo Html::linkedScript(
'config.js' ) .
"\n"; ?>
277<?php echo Html::openElement(
'body', [
'class' => $this->
getLanguage()->getDir() ] ) .
"\n"; ?>
278<div
id=
"mw-page-base"></div>
279<div
id=
"mw-head-base"></div>
280<div
id=
"content" class=
"mw-body" role=
"main">
281<div
id=
"bodyContent" class=
"mw-body-content">
289 echo Html::closeElement(
'body' ) . Html::closeElement(
'html' );
298 <div
class=
"portal" id=
"p-logo">
299 <a href=
"https://www.mediawiki.org/" title=
"Main Page"></a>
302 $message =
wfMessage(
'config-sidebar' )->plain();
305 foreach ( explode(
'----', $message ) as $section ) {
306 echo
'<div class="portal"><div class="body">';
307 echo $this->parent->parse( $section,
true );
311 echo
'<div class="portal"><div class="body"><ul>';
313 'config-sidebar-readme' =>
'Readme',
314 'config-sidebar-relnotes' =>
'ReleaseNotes',
315 'config-sidebar-license' =>
'Copying',
316 'config-sidebar-upgrade' =>
'UpgradeDoc',
317 ] as $msgKey => $pageName ) {
318 echo $this->parent->makeLinkItem(
319 $this->parent->getDocUrl( $pageName ),
323 echo
'</ul></div></div>';
328 echo Html::closeElement(
'body' ) . Html::closeElement(
'html' );
336 <meta name=
"robots" content=
"noindex, nofollow" />
337 <meta http-equiv=
"Content-type" content=
"text/html; charset=utf-8" />
341 <?php echo Html::linkedScript(
'config.js' ) .
"\n"; ?>
344<body style=
"background-image: none">
357 return Html::linkedScript(
"../resources/lib/jquery/jquery.js" );
$wgStyleDirectory
Filesystem stylesheets directory.
$wgVersion
MediaWiki version number.
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.
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.