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 =
'';
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" );