r78402 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r78401‎ | r78402 | r78403 >
Date:21:40, 14 December 2010
Author:reedy
Status:ok
Tags:
Comment:
* (bug 26339) Throw warning when truncating an overlarge API result
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/api/ApiResult.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/api/ApiResult.php
@@ -257,6 +257,9 @@
258258 if ( $this->mCheckingSize ) {
259259 $newsize = $this->mSize + self::size( $value );
260260 if ( $newsize > $wgAPIMaxResultSize ) {
 261+ $this->setWarning(
 262+ "This result was truncated because it would otherwise be larger than the " .
 263+ "limit of {$wgAPIMaxResultSize} bytes" );
261264 return false;
262265 }
263266 $this->mSize = $newsize;
Index: trunk/phase3/RELEASE-NOTES
@@ -37,6 +37,7 @@
3838 * (bug 18372) File types blacklisted by $wgFileBlacklist will no longer be shown as "Permitted file types" on the upload form
3939
4040 === API changes in 1.18 ===
 41+* (bug 26339) Throw warning when truncating an overlarge API result
4142
4243 === Languages updated in 1.18 ===
4344

Status & tagging log