r90339 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r90338‎ | r90339 | r90340 >
Date:14:55, 18 June 2011
Author:platonides
Status:ok (Comments)
Tags:
Comment:
Add deprecated $wgArticle again. Fixes r88588.
Modified paths:
  • /trunk/phase3/includes/Wiki.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Wiki.php
@@ -198,6 +198,14 @@
199199 // may be a redirect to another article or URL.
200200 $article = $this->initializeArticle();
201201 if ( is_object( $article ) ) {
 202+ /**
 203+ * $wgArticle is deprecated, do not use it. This will possibly be removed
 204+ * entirely in 1.20 or 1.21
 205+ * @deprecated since 1.19
 206+ */
 207+ global $wgArticle;
 208+ $wgArticle = $article;
 209+
202210 $this->performAction( $article );
203211 wfProfileOut( __METHOD__ );
204212 return $article;

Follow-up revisions

RevisionCommit summaryAuthorDate
r90346Only accept $wgArticle in Wiki.php after r90339....platonides15:19, 18 June 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r88588$wgArticle is deprecated! Possible removal in 1.20 or 1.21!...demon17:59, 22 May 2011

Comments

#Comment by Nikerabbit (talk | contribs)   15:42, 18 June 2011

If you do it like that, doxygen will mark the function deprecated instead.

#Comment by Platonides (talk | contribs)   19:58, 18 June 2011

Are you sure? That's the way it was in index.php [1], also inside a funcion. I just copied it.

#Comment by Nikerabbit (talk | contribs)   20:10, 18 June 2011

I'm pretty sure yes. No idea why that function in index.php is not picked up.

#Comment by P858snake (talk | contribs)   12:01, 19 June 2011

doxygen is only for trunk atm (afaik) which is 1.19 so that is fine...

#Comment by Krinkle (talk | contribs)   11:54, 19 June 2011

I'm not sure exactly how doxygen work, perhaps documenting it with @var will do it?

Status & tagging log