* added redundand join condition for index usage as per comment on CR r88008
[lhc/web/wiklou.git] / includes / OutputPage.php
index e4336a1..a45a3ad 100644 (file)
@@ -1864,7 +1864,7 @@ class OutputPage extends ContextSource {
                        wfRunHooks( 'BeforePageDisplay', array( &$this, &$sk ) );
 
                        wfProfileIn( 'Output-skin' );
-                       $sk->outputPage( $this );
+                       $sk->outputPage();
                        wfProfileOut( 'Output-skin' );
                }
 
@@ -1895,7 +1895,7 @@ class OutputPage extends ContextSource {
         *
         * showErrorPage( 'titlemsg', 'pagetextmsg', array( 'param1', 'param2' ) );
         * showErrorPage( 'titlemsg', $messageObject );
-        * 
+        *
         * @param $title String: message key for page title
         * @param $msg Mixed: message key (string) for page text, or a Message object
         * @param $params Array: message parameters; ignored if $msg is a Message object
@@ -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
@@ -2658,7 +2658,7 @@ $templates
                }
 
                // Allow extensions to add their custom variables to the global JS variables
-               wfRunHooks( 'MakeGlobalVariablesScript', array( &$vars ) );
+               wfRunHooks( 'MakeGlobalVariablesScript', array( &$vars, &$this ) );
 
                return $vars;
        }
@@ -3039,7 +3039,7 @@ $templates
                                        ResourceLoaderModule::TYPE_STYLES
                        );
                }
-               
+
                // Add stuff in $otherTags (previewed user CSS if applicable)
                $ret .= $otherTags;
                return $ret;