r102512 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r102511‎ | r102512 | r102513 >
Date:13:26, 9 November 2011
Author:demon
Status:ok (Comments)
Tags:
Comment:
Remove the LAST $wgArticle anywhere in extensions. This has been deprecated in core already (probably to be removed entirely in 1.20).

Can we hang up the "Mission Accomplished" banner now?
Modified paths:
  • /trunk/extensions/WikimediaMaintenance/rL.php (modified) (history)

Diff [purge]

Index: trunk/extensions/WikimediaMaintenance/rL.php
@@ -163,7 +163,7 @@
164164 * @param $id int The page_id of the redirect
165165 */
166166 private function fixRedirect( $id ){
167 - global $wgTitle, $wgArticle;
 167+ global $wgTitle;
168168
169169 $wgTitle = Title::newFromID( $id );
170170 $dbw = wfGetDB( DB_MASTER );
@@ -175,9 +175,9 @@
176176 __METHOD__ );
177177 return;
178178 }
179 - $wgArticle = new Article($wgTitle);
 179+ $article = new Article($wgTitle);
180180
181 - $rt = $wgArticle->followRedirect();
 181+ $rt = $article->followRedirect();
182182
183183 if($rt == false || !is_object($rt)) {
184184 // $wgTitle is not a redirect
@@ -185,7 +185,7 @@
186186 $dbw->delete( 'redirect', array( 'rd_from' => $id ),
187187 __METHOD__ );
188188 } else {
189 - $wgArticle->updateRedirectOn($dbw,$rt);
 189+ $article->updateRedirectOn($dbw,$rt);
190190 }
191191 }
192192

Comments

#Comment by Hashar (talk | contribs)   11:10, 13 December 2011

And "new Article()" is deprecated too :-)


Well done Chad!

Status & tagging log