r95705 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r95704‎ | r95705 | r95706 >
Date:21:48, 29 August 2011
Author:dantman
Status:ok
Tags:
Comment:
Kill off the last $wgUser and improper use of linker by skin in OutputPage.
Modified paths:
  • /trunk/phase3/includes/OutputPage.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/OutputPage.php
@@ -2055,8 +2055,7 @@
20562056 * @param $action String: action that was denied or null if unknown
20572057 */
20582058 public function readOnlyPage( $source = null, $protected = false, $reasons = array(), $action = null ) {
2059 - global $wgUser, $wgEnableInterwikiTranscluding, $wgEnableInterwikiTemplatesTracking;
2060 - $skin = $wgUser->getSkin();
 2059+ global $wgEnableInterwikiTranscluding, $wgEnableInterwikiTemplatesTracking;
20612060
20622061 $this->setRobotPolicy( 'noindex,nofollow' );
20632062 $this->setArticleRelated( false );
@@ -2107,12 +2106,13 @@
21082107 </div>
21092108 " );
21102109 if ( $wgEnableInterwikiTranscluding && $wgEnableInterwikiTemplatesTracking ) {
 2110+ $distantTemplates = Linker::formatDistantTemplates( $article->getUsedDistantTemplates() );
21112111 $this->addHTML( "<div class='distantTemplatesUsed'>
2112 -{$skin->formatDistantTemplates( $article->getUsedDistantTemplates( ) )}
 2112+$distantTemplates
21132113 </div>
21142114 " );
 2115+ }
21152116 }
2116 - }
21172117
21182118 # If the title doesn't exist, it's fairly pointless to print a return
21192119 # link to it. After all, you just tried editing it and couldn't, so

Status & tagging log