r86273 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r86272‎ | r86273 | r86274 >
Date:19:25, 17 April 2011
Author:happy-melon
Status:ok (Comments)
Tags:
Comment:
Follow-up r85929: update MediaWiki::articleFromTitle() calls in extensions (and a few edgecases which were missed in core)
Modified paths:
  • /trunk/extensions/DumpHTML/dumpHTML.inc (modified) (history)
  • /trunk/extensions/TalkHere/TalkHere.php (modified) (history)
  • /trunk/extensions/TalkHere/TalkHereHooks.php (modified) (history)
  • /trunk/extensions/WebDAV/WebDavServer.php (modified) (history)
  • /trunk/phase3/includes/api/ApiPurge.php (modified) (history)
  • /trunk/phase3/index.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/api/ApiPurge.php
@@ -68,7 +68,7 @@
6969 $result[] = $r;
7070 continue;
7171 }
72 - $article = MediaWiki::articleFromTitle( $title );
 72+ $article = MediaWiki::articleFromTitle( $title, RequestContext::getMain() );
7373 $article->doPurge(); // Directly purge and skip the UI part of purge().
7474 $r['purged'] = '';
7575
Index: trunk/phase3/index.php
@@ -119,7 +119,7 @@
120120 $cache->loadFromFileCache();
121121 }
122122 # Do any stats increment/watchlist stuff
123 - $wgArticle = MediaWiki::articleFromTitle( $wgTitle );
 123+ $wgArticle = MediaWiki::articleFromTitle( $wgTitle, $context );
124124 $wgArticle->viewUpdates();
125125 # Tell OutputPage that output is taken care of
126126 $context->output->disable();
Index: trunk/extensions/WebDAV/WebDavServer.php
@@ -334,7 +334,7 @@
335335 }
336336 }
337337
338 - $article = MediaWiki::articleFromTitle( $title );
 338+ $article = MediaWiki::articleFromTitle( $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 );
 399+ $article = MediaWiki::articleFromTitle( $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 );
 438+ $article = MediaWiki::articleFromTitle( $title, RequestContext::getMain() );
439439
440440 if ( ( $handle = $this->openRequestBody() ) === false ) {
441441 return;
Index: trunk/extensions/TalkHere/TalkHere.php
@@ -75,7 +75,7 @@
7676 );
7777
7878 $wgRequest = new FauxRequest( $args );
79 - $article = MediaWiki::articleFromTitle( $wgTitle );
 79+ $article = MediaWiki::articleFromTitle( $wgTitle, RequestContext::getMain() );
8080 $editor = new EditPage( $article );
8181
8282 //generate form
Index: trunk/extensions/TalkHere/TalkHereHooks.php
@@ -46,7 +46,7 @@
4747
4848 $skin = $wgUser->getSkin();
4949
50 - $talkArticle = MediaWiki::articleFromTitle( $talk );
 50+ $talkArticle = MediaWiki::articleFromTitle( $talk, RequestContext::getMain() );
5151
5252 $wgOut->addHTML('<div class="talkhere" id="talkhere">');
5353
Index: trunk/extensions/DumpHTML/dumpHTML.inc
@@ -799,9 +799,9 @@
800800 $wgOut = new OutputPage;
801801 $wgOut->parserOptions( new ParserOptions );
802802 $wgOut->setTitle( $title );
803 - SpecialPage::executePath( $wgTitle );
 803+ SpecialPage::executePath( $wgTitle, RequestContext::getMain() );
804804 } else {
805 - $article = MediaWiki::articleFromTitle( $wgTitle );
 805+ $article = MediaWiki::articleFromTitle( $wgTitle, RequestContext::getMain() );
806806 $rt = $article->followRedirect();
807807 if ( is_object( $rt ) ) {
808808 return $this->getRedirect( $rt );

Follow-up revisions

RevisionCommit summaryAuthorDate
r87641Fix E_STRICT reported on r86273 CR.happy-melon15:28, 7 May 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r85929Implement a $context and getContext/setContext methods for Article (and its s...happy-melon23:00, 12 April 2011

Comments

#Comment by Reedy (talk | contribs)   12:32, 1 May 2011

I'm guessing it's r85929 at fault really...

-rakkaus/#mediawiki-i18n- (8 lines skipped) [01-May-2011 12:21:13] PHP Strict Standards:  Only variables should be passed by reference in /www/w/includes/api/ApiPurge.php on line 71
-rakkaus/#mediawiki-i18n- (55 lines skipped) [01-May-2011 12:21:43] PHP Strict Standards:  Only variables should be passed by reference in /www/w/includes/api/ApiPurge.php on line 71
-rakkaus/#mediawiki-i18n- (72 lines skipped) [01-May-2011 12:22:11] PHP Strict Standards:  Only variables should be passed by reference in /www/w/includes/api/ApiPurge.php on line 71
-rakkaus/#mediawiki-i18n- (19 lines skipped) [01-May-2011 12:22:42] PHP Strict Standards:  Only variables should be passed by reference in /www/w/includes/api/ApiPurge.php on line 71
-rakkaus/#mediawiki-i18n- (10 lines skipped) [01-May-2011 12:22:50] PHP Strict Standards:  Only variables should be passed by reference in /www/w/includes/api/ApiPurge.php on line 71
"<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">\n<html>\n<head>\n\t<title>MediaWiki API</title>\n</head>\n<body>\n<pre>\n<span style=\"color:blue;\"><?xml version=\"1.0\"?></span>\n<span style=\"color:blue;\"><api servedby=\"v22011026445052.yourvserver.net\"></span>\n  <span style=\"color:blue;\"><error code=\"internal_api_error_MWException\" info=\"Exception Caught: Invalid marker: ?UNIQ23b0557e38403615-languages-00000000-QINU?\" xml:space=\"preserve\" /></span>\n<span style=\"color:blue;\"></api></span>\n

\n</body>\n</html>\n"


While to purge http://translatewiki.net/w/i.php?title=Project:About/fi and some others


Seems some pages are fine, some aren't. Not really sure on the correlation between them

#Comment by Reedy (talk | contribs)   12:33, 1 May 2011

Well, this might actually be 2 errors. Top one is probably yours, the 2nd as it's "Exception Caught: Invalid marker: ?UNIQ23b0557e38403615-languages-00000000-QINU?" might be a category collation sorting type error

Status & tagging log