From: Alexandre Emsenhuber Date: Tue, 4 Jan 2011 14:49:08 +0000 (+0000) Subject: Use isArticleRelated() instead of checking if $wgArticle is set X-Git-Tag: 1.31.0-rc.0~32824 X-Git-Url: http://git.cyclocoop.org/%24href?a=commitdiff_plain;h=903a3752fda9fa50d99407879f4c13e0c1136842;p=lhc%2Fweb%2Fwiklou.git Use isArticleRelated() instead of checking if $wgArticle is set --- diff --git a/includes/OutputPage.php b/includes/OutputPage.php index 83f6d45b35..581653d072 100644 --- a/includes/OutputPage.php +++ b/includes/OutputPage.php @@ -1614,7 +1614,6 @@ class OutputPage { global $wgLanguageCode, $wgDebugRedirects, $wgMimeType; global $wgUseAjax, $wgAjaxWatch; global $wgEnableMWSuggest, $wgUniversalEditButton; - global $wgArticle; if( $this->mDoNothing ) { return; @@ -1675,7 +1674,7 @@ class OutputPage { } if( $wgUniversalEditButton ) { - if( isset( $wgArticle ) && $this->getTitle() && $this->getTitle()->quickUserCan( 'edit' ) + if( $this->isArticleRelated() && $this->getTitle() && $this->getTitle()->quickUserCan( 'edit' ) && ( $this->getTitle()->exists() || $this->getTitle()->quickUserCan( 'create' ) ) ) { // Original UniversalEditButton $msg = wfMsg( 'edit' );