r108521 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r108520‎ | r108521 | r108522 >
Date:17:13, 10 January 2012
Author:ialex
Status:deferred
Tags:
Comment:
Use Article::newFromTitle() instead MediaWiki::articleFromTitle(); that function was added in MW 1.18 and the call to RequestContext::getMain() requires MW 1.18
Modified paths:
  • /trunk/extensions/TalkHere/TalkHere.php (modified) (history)
  • /trunk/extensions/TalkHere/TalkHereHooks.php (modified) (history)
  • /trunk/extensions/WebDAV/WebDavServer.php (modified) (history)

Diff [purge]

Index: trunk/extensions/WebDAV/WebDavServer.php
@@ -334,7 +334,7 @@
335335 }
336336 }
337337
338 - $article = MediaWiki::articleFromTitle( $title, RequestContext::getMain() );
 338+ $article = Article::newFromTitle( $title, RequestContext::getMain() );
339339
340340 $rawPage = new RawPage( $article );
341341
@@ -395,7 +395,7 @@
396396 $title = Title::newMainPage();
397397 }
398398
399 - $article = MediaWiki::articleFromTitle( $title, RequestContext::getMain() );
 399+ $article = Article::newFromTitle( $title, RequestContext::getMain() );
400400
401401 # Must check if article exists to avoid 500 Internal Server Error
402402
@@ -434,7 +434,7 @@
435435 return;
436436 }
437437
438 - $article = MediaWiki::articleFromTitle( $title, RequestContext::getMain() );
 438+ $article = Article::newFromTitle( $title, RequestContext::getMain() );
439439
440440 if ( ( $handle = $this->openRequestBody() ) === false ) {
441441 return;
Index: trunk/extensions/TalkHere/TalkHere.php
@@ -60,7 +60,7 @@
6161 $wgRequest = new FauxRequest( $args );
6262 $wgTitle = $title;
6363
64 - $article = MediaWiki::articleFromTitle( $title, RequestContext::getMain() );
 64+ $article = Article::newFromTitle( $title, RequestContext::getMain() );
6565 $editor = new TalkHereEditPage( $article );
6666
6767 //generate form
Index: trunk/extensions/TalkHere/TalkHereHooks.php
@@ -46,7 +46,7 @@
4747
4848 $skin = $wgUser->getSkin();
4949
50 - $talkArticle = MediaWiki::articleFromTitle( $talk, RequestContext::getMain() );
 50+ $talkArticle = Article::newFromTitle( $talk, RequestContext::getMain() );
5151
5252 $wgOut->addHTML('<div class="talkhere" id="talkhere">');
5353

Status & tagging log