global $wgOut, $wgUser, $wgRequest, $wgRedirectSources;
$rdfrom = $wgRequest->getVal( 'rdfrom' );
- $sk = $wgUser->getSkin();
if ( isset( $this->mRedirectedFrom ) ) {
// This is an internally redirected page view.
// We'll need a backlink to the source page for navigation.
if ( wfRunHooks( 'ArticleViewRedirect', array( &$this ) ) ) {
- $redir = $sk->link(
+ $redir = $wgUser->getSkin()->link(
$this->mRedirectedFrom,
null,
array(),
// This is an externally redirected view, from some other wiki.
// If it was reported from a trusted site, supply a backlink.
if ( $wgRedirectSources && preg_match( $wgRedirectSources, $rdfrom ) ) {
- $redir = $sk->makeExternalLink( $rdfrom, $rdfrom );
+ $redir = $wgUser->getSkin()->makeExternalLink( $rdfrom, $rdfrom );
$s = wfMsgExt( 'redirectedfrom', array( 'parseinline', 'replaceafter' ), $redir );
$wgOut->setSubtitle( $s );
}
}
- $sk = $wgUser->getSkin();
-
// Add base resources
$this->addModules( 'mediawiki.util' );
global $wgIncludeLegacyJavaScript;
if ( $this->mArticleBodyOnly ) {
$this->out( $this->mBodytext );
} else {
+ $sk = $wgUser->getSkin();
+
// Hook that allows last minute changes to the output page, e.g.
// adding of CSS or Javascript by extensions.
wfRunHooks( 'BeforePageDisplay', array( &$this, &$sk ) );