Index: trunk/phase3/includes/OutputPage.php |
— | — | @@ -1785,8 +1785,6 @@ |
1786 | 1786 | } |
1787 | 1787 | } |
1788 | 1788 | |
1789 | | - $sk = $wgUser->getSkin(); |
1790 | | - |
1791 | 1789 | // Add base resources |
1792 | 1790 | $this->addModules( 'mediawiki.util' ); |
1793 | 1791 | global $wgIncludeLegacyJavaScript; |
— | — | @@ -1849,6 +1847,8 @@ |
1850 | 1848 | if ( $this->mArticleBodyOnly ) { |
1851 | 1849 | $this->out( $this->mBodytext ); |
1852 | 1850 | } else { |
| 1851 | + $sk = $wgUser->getSkin(); |
| 1852 | + |
1853 | 1853 | // Hook that allows last minute changes to the output page, e.g. |
1854 | 1854 | // adding of CSS or Javascript by extensions. |
1855 | 1855 | wfRunHooks( 'BeforePageDisplay', array( &$this, &$sk ) ); |
Index: trunk/phase3/includes/Article.php |
— | — | @@ -1216,13 +1216,12 @@ |
1217 | 1217 | global $wgOut, $wgUser, $wgRequest, $wgRedirectSources; |
1218 | 1218 | |
1219 | 1219 | $rdfrom = $wgRequest->getVal( 'rdfrom' ); |
1220 | | - $sk = $wgUser->getSkin(); |
1221 | 1220 | |
1222 | 1221 | if ( isset( $this->mRedirectedFrom ) ) { |
1223 | 1222 | // This is an internally redirected page view. |
1224 | 1223 | // We'll need a backlink to the source page for navigation. |
1225 | 1224 | if ( wfRunHooks( 'ArticleViewRedirect', array( &$this ) ) ) { |
1226 | | - $redir = $sk->link( |
| 1225 | + $redir = $wgUser->getSkin()->link( |
1227 | 1226 | $this->mRedirectedFrom, |
1228 | 1227 | null, |
1229 | 1228 | array(), |
— | — | @@ -1250,7 +1249,7 @@ |
1251 | 1250 | // This is an externally redirected view, from some other wiki. |
1252 | 1251 | // If it was reported from a trusted site, supply a backlink. |
1253 | 1252 | if ( $wgRedirectSources && preg_match( $wgRedirectSources, $rdfrom ) ) { |
1254 | | - $redir = $sk->makeExternalLink( $rdfrom, $rdfrom ); |
| 1253 | + $redir = $wgUser->getSkin()->makeExternalLink( $rdfrom, $rdfrom ); |
1255 | 1254 | $s = wfMsgExt( 'redirectedfrom', array( 'parseinline', 'replaceafter' ), $redir ); |
1256 | 1255 | $wgOut->setSubtitle( $s ); |
1257 | 1256 | |