Kill off the last $wgUser and improper use of linker by skin in OutputPage.
authorDaniel Friesen <dantman@users.mediawiki.org>
Mon, 29 Aug 2011 21:48:51 +0000 (21:48 +0000)
committerDaniel Friesen <dantman@users.mediawiki.org>
Mon, 29 Aug 2011 21:48:51 +0000 (21:48 +0000)
includes/OutputPage.php

index e4336a1..9b10628 100644 (file)
@@ -2055,8 +2055,7 @@ class OutputPage extends ContextSource {
         * @param $action    String: action that was denied or null if unknown
         */
        public function readOnlyPage( $source = null, $protected = false, $reasons = array(), $action = null ) {
-               global $wgUser, $wgEnableInterwikiTranscluding, $wgEnableInterwikiTemplatesTracking;
-               $skin = $wgUser->getSkin();
+               global $wgEnableInterwikiTranscluding, $wgEnableInterwikiTemplatesTracking;
 
                $this->setRobotPolicy( 'noindex,nofollow' );
                $this->setArticleRelated( false );
@@ -2107,11 +2106,12 @@ $templates
 </div>
 " );
                        if ( $wgEnableInterwikiTranscluding && $wgEnableInterwikiTemplatesTracking ) {
+                               $distantTemplates = Linker::formatDistantTemplates( $article->getUsedDistantTemplates() );
                                $this->addHTML( "<div class='distantTemplatesUsed'>
-{$skin->formatDistantTemplates( $article->getUsedDistantTemplates( ) )}
+$distantTemplates
 </div>
 " );
-               }
+                       }
                }
 
                # If the title doesn't exist, it's fairly pointless to print a return