API: Fix fetching login token from action=query&meta=tokens on private wikis
authorBrad Jorsch <bjorsch@wikimedia.org>
Fri, 14 Feb 2020 20:22:36 +0000 (15:22 -0500)
committerAnomie <bjorsch@wikimedia.org>
Mon, 16 Mar 2020 17:57:21 +0000 (17:57 +0000)
commit5e55aeed717707bdf095bdea7ec74b5aeeea3127
tree44037a17c5b1170d85939782fd23b72f12c53bc3
parent180e1b269fcff29fc1dd336a6217baca64d92bc3
API: Fix fetching login token from action=query&meta=tokens on private wikis

Accidentally broken by I991809acf.

Also added a test that should hopefully prevent this from accidentally
being broken again.

Bug: T245149
Change-Id: Ia7985397db50efe8af81f643f2a0a89d0ece179e
(cherry picked from commit e0f3a29349ffd8a3be14cec164c1e0f719e0e74b)
includes/api/ApiQuery.php
tests/phpunit/includes/api/query/ApiQueryTest.php