API: Don't rollback changes if the exception was a UsageException
authorKunal Mehta <legoktm@gmail.com>
Tue, 22 Apr 2014 16:56:40 +0000 (09:56 -0700)
committerKunal Mehta <legoktm@gmail.com>
Tue, 22 Apr 2014 16:56:40 +0000 (09:56 -0700)
commit487e9dc599298b57e5583f19945987ce0b0f287b
treeb7345f0707b9817e169a0806d8d4db728b85a9ea
parentbc4147866e27965ca67bf88aac21c4ccfb061776
API: Don't rollback changes if the exception was a UsageException

In I1b7396ceb, we were trying to log failures to Special:Log, but
since $this->dieUsage throws an exception, the log entry insertion
was being rolled back.

This is similar to I36cd645d which was for index.php calls.

Change-Id: I136ba66d2f939fcdd0c9326e04d686a30449bf4c
Follows-Up: I8f1da51187b281fe4afc0d5a0c49f5caf3612e92
includes/api/ApiMain.php