(bug 29246) Edit API occasionally throws "unknown error 231". Per comment #1 on the...
authorRoan Kattouw <catrope@users.mediawiki.org>
Fri, 26 Aug 2011 16:26:17 +0000 (16:26 +0000)
committerRoan Kattouw <catrope@users.mediawiki.org>
Fri, 26 Aug 2011 16:26:17 +0000 (16:26 +0000)
commit5090af900c4b75f1fd27724a8c3b3ce8ef3e5dab
treec26cfc6f286bcc893697597a49f37785c241815b
parent9334fe9ab7133014ac64ebf612599f853fcbaa70
(bug 29246) Edit API occasionally throws "unknown error 231". Per comment #1 on the bug and a comment in ApiEditPage, I refactored internalAttemptSave() to return a status object. However, there are so many idiosyncracies wrt how EditPage handles various errors that I decided to put the AS_* error code in $status->value (thanks Chad for that tip) and use that to decide what to do (not part of Chad's tip). The resulting code is still a mess but at least Status objects from doEdit() are propagated now, and it'll be a little bit easier to migrate internalAttemptSave() to a proper Status-based architecture in the future. Or maybe we should just throw away EditPage and start with a blank screen, that sounds appealing to me :)
includes/EditPage.php
includes/api/ApiBase.php
includes/api/ApiEditPage.php