From 903a3752fda9fa50d99407879f4c13e0c1136842 Mon Sep 17 00:00:00 2001 From: Alexandre Emsenhuber Date: Tue, 4 Jan 2011 14:49:08 +0000 Subject: [PATCH] Use isArticleRelated() instead of checking if $wgArticle is set --- includes/OutputPage.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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' ); -- 2.20.1