From 2f28d7dd70a66699bb80d273b8530c6bb53f8501 Mon Sep 17 00:00:00 2001 From: Chad Horohoe Date: Fri, 1 Nov 2013 14:13:15 -0700 Subject: [PATCH] Kill $wgArticle This has been deprecated since 1.18, throwing warnings for over a year and a half now, and nothing uses it anywhere in core or deployed extensions. No extensions in SVN seem to have this anymore (we must've cleaned up well), and the only affected extensions in Git are: - BlueSpiceExtensions - DynamicPageList (commented, so shouldn't be a worry) - SemanticPageMaker - TwitterCards If you're the author of one of these extensions or are feeling like cleaning up ancient code, please get them fixed. Change-Id: I8f3a54c14be4b38a8b917e32ba3a832e0a7ca116 --- RELEASE-NOTES-1.23 | 1 + docs/hooks.txt | 2 +- includes/DeprecatedGlobal.php | 1 - includes/Wiki.php | 7 ------- 4 files changed, 2 insertions(+), 9 deletions(-) diff --git a/RELEASE-NOTES-1.23 b/RELEASE-NOTES-1.23 index 6c7825388b..c9b56b9372 100644 --- a/RELEASE-NOTES-1.23 +++ b/RELEASE-NOTES-1.23 @@ -34,6 +34,7 @@ regularly. Below only new and removed languages are listed, as well as changes to languages because of Bugzilla reports. === Other changes in 1.23 === +* The global variable $wgArticle has been removed after a lengthy deprecation == Compatibility == diff --git a/docs/hooks.txt b/docs/hooks.txt index 84888d2756..96a72df677 100644 --- a/docs/hooks.txt +++ b/docs/hooks.txt @@ -1608,7 +1608,7 @@ $wcOnlySysopsCanPatrol: config setting indicating whether the user must be a something completely different, after the basic globals have been set up, but before ordinary actions take place. $output: $wgOut -$article: $wgArticle +$article: Article on which the action will be performed $title: $wgTitle $user: $wgUser $request: $wgRequest diff --git a/includes/DeprecatedGlobal.php b/includes/DeprecatedGlobal.php index d48bd0b0ca..8a637862ee 100644 --- a/includes/DeprecatedGlobal.php +++ b/includes/DeprecatedGlobal.php @@ -23,7 +23,6 @@ /** * Class to allow throwing wfDeprecated warnings * when people use globals that we do not want them to. - * (For example like $wgArticle) */ class DeprecatedGlobal extends StubObject { diff --git a/includes/Wiki.php b/includes/Wiki.php index 08567ee355..a690176d5d 100644 --- a/includes/Wiki.php +++ b/includes/Wiki.php @@ -302,13 +302,6 @@ class MediaWiki { $article = $this->initializeArticle(); if ( is_object( $article ) ) { $pageView = true; - /** - * $wgArticle is deprecated, do not use it. - * @deprecated since 1.18 - */ - global $wgArticle; - $wgArticle = new DeprecatedGlobal( 'wgArticle', $article, '1.18' ); - $this->performAction( $article, $requestTitle ); } elseif ( is_string( $article ) ) { $output->redirect( $article ); -- 2.20.1