Added ApiResult::NO_SIZE_CHECK flag for addValue()
authorYuri Astrakhan <yurik@wikimedia.org>
Mon, 7 Jul 2014 18:07:14 +0000 (14:07 -0400)
committerBrad Jorsch <bjorsch@wikimedia.org>
Fri, 11 Jul 2014 18:53:58 +0000 (14:53 -0400)
commit43b1eb3f7241e7f34f618c0b168fd8dae698a0e0
treebc3e337ddac2dc0f77b90d1d84919d321bd1c53e
parentb3c307518a8dfd8a38267e17edbc8342822c2f45
Added ApiResult::NO_SIZE_CHECK flag for addValue()

This way we no longer need to disable size checking just for one operation
(enable|disable)SizeCheck functions were depricated.

Overall, this is a much better practice than disabling than re-enabling
the flag, as it might lead to accidentally forgetting to re-enable it,
just like the issue with the dangling file handlers, etc.

Example:

disable, do some complex logic, re-enable.  And later, by accident,
the complex logic is changed to return a value half-way, or throws
an exception that gets handled as part of normal operations. This
results in the unsafe disabled state of the result object,
which is not good (tm).

Change-Id: I389a334d35f52f23a1847aca4aef5e96b262f589
RELEASE-NOTES-1.24
includes/api/ApiBase.php
includes/api/ApiFormatBase.php
includes/api/ApiMain.php
includes/api/ApiQuery.php
includes/api/ApiResult.php