r70450 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r70449‎ | r70450 | r70451 >
Date:07:44, 4 August 2010
Author:reedy
Status:ok (Comments)
Tags:
Comment:
* (bug 24656) API's parse module needs option to disable PP report
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/api/ApiParse.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/api/ApiParse.php
@@ -73,7 +73,7 @@
7474
7575 $popts = new ParserOptions();
7676 $popts->setTidy( true );
77 - $popts->enableLimitReport();
 77+ $popts->enableLimitReport( !$params['disablepp'] );
7878 $redirValues = null;
7979 if ( !is_null( $oldid ) || !is_null( $pageid ) || !is_null( $page ) ) {
8080 if ( !is_null( $oldid ) ) {
@@ -401,6 +401,7 @@
402402 'onlypst' => false,
403403 'uselang' => null,
404404 'section' => null,
 405+ 'disablepp' => false,
405406 );
406407 }
407408
@@ -441,6 +442,7 @@
442443 ),
443444 'uselang' => 'Which language to parse the request in',
444445 'section' => 'Only retrieve the content of this section number',
 446+ 'disablepp' => 'Disable the PP Report from the parser output',
445447 );
446448 }
447449
Index: trunk/phase3/RELEASE-NOTES
@@ -315,6 +315,7 @@
316316 * (bug 24485) Make iwbacklinks a generator, optionally display iwprefix and iwtitle
317317 * (bug 24564) Fix fatal errors when using list=deletedrevs, prop=revisions or
318318 one of the backlinks generators with limit=max.
 319+* (bug 24656) API's parse module needs option to disable PP report
319320
320321 === Languages updated in 1.17 ===
321322

Comments

#Comment by Nikerabbit (talk | contribs)   09:27, 4 August 2010

I guess we have a convention against negative globals, but not against negative parameters :)

#Comment by Catrope (talk | contribs)   13:39, 4 August 2010

Yes, the fact that we're using a negative parameter is not ideal, but it's needed for backwards compatibility here.

Status & tagging log