r79583 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r79582‎ | r79583 | r79584 >
Date:14:49, 4 January 2011
Author:ialex
Status:ok
Tags:
Comment:
Use isArticleRelated() instead of checking if $wgArticle is set
Modified paths:
  • /trunk/phase3/includes/OutputPage.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/OutputPage.php
@@ -1614,7 +1614,6 @@
16151615 global $wgLanguageCode, $wgDebugRedirects, $wgMimeType;
16161616 global $wgUseAjax, $wgAjaxWatch;
16171617 global $wgEnableMWSuggest, $wgUniversalEditButton;
1618 - global $wgArticle;
16191618
16201619 if( $this->mDoNothing ) {
16211620 return;
@@ -1675,7 +1674,7 @@
16761675 }
16771676
16781677 if( $wgUniversalEditButton ) {
1679 - if( isset( $wgArticle ) && $this->getTitle() && $this->getTitle()->quickUserCan( 'edit' )
 1678+ if( $this->isArticleRelated() && $this->getTitle() && $this->getTitle()->quickUserCan( 'edit' )
16801679 && ( $this->getTitle()->exists() || $this->getTitle()->quickUserCan( 'create' ) ) ) {
16811680 // Original UniversalEditButton
16821681 $msg = wfMsg( 'edit' );

Status & tagging log