}
$lb = new LinkBatch( $titles );
+ $lb->setCaller( __METHOD__ );
$lb->execute();
}
static function makeVariablesScript( $data ) {
if ( $data ) {
- return Html::inlineScript( 'mediaWiki.config.set(' . FormatJson::encode( $data ) . ');' );
+ return Html::inlineScript(
+ ResourceLoader::makeLoaderConditionalScript( ResourceLoader::makeConfigSetScript( $data ) )
+ );
} else {
return '';
}
* @private
*/
function setupUserCss( OutputPage $out ) {
- global $wgRequest, $wgUser;
+ global $wgRequest;
global $wgUseSiteCss, $wgAllowUserCss, $wgAllowUserCssPrefs, $wgSquidMaxage;
wfProfileIn( __METHOD__ );
// Per-user preference styles
if ( $wgAllowUserCssPrefs ) {
- $out->addModuleStyles( 'user.preferences' );
+ $out->addModuleStyles( 'user.options' );
}
wfProfileOut( __METHOD__ );
return "$numeric $type $name";
}
+
+ /**
+ * This will be called by OutputPage::headElement when it is creating the
+ * <body> tag, skins can override it if they have a need to add in any
+ * body attributes or classes of their own.
+ */
+ function bodyAttributes( $out, &$bodyAttrs ) {
+ // does nothing by default
+ }
/**
* URL to the logo
function subPageSubtitle() {
$subpages = '';
- if ( !wfRunHooks( 'SkinSubPageSubtitle', array( &$subpages ) ) ) {
+ if ( !wfRunHooks( 'SkinSubPageSubtitle', array( &$subpages, $this ) ) ) {
return $subpages;
}
SpecialPage::getTitleFor( 'Userlogout' ), wfMsg( 'logout' ),
array(), array( 'returnto' => $returnTo )
),
- $this->specialLink( 'preferences' ),
+ $this->specialLink( 'Preferences' ),
) );
}
$s = array(
$this->mainPageLink(),
- $this->specialLink( 'recentchanges' )
+ $this->specialLink( 'Recentchanges' )
);
if ( $wgOut->isArticleRelated() ) {
return array(
'href' => $title->getLocalURL( $urlaction ),
- 'exists' => $title->getArticleID() != 0 ? true : false
+ 'exists' => $title->getArticleID() != 0,
);
}