ApiComparePages: Clean up handling of slot deletion
authorBrad Jorsch <bjorsch@wikimedia.org>
Fri, 31 Aug 2018 15:22:30 +0000 (11:22 -0400)
committerBrad Jorsch <bjorsch@wikimedia.org>
Fri, 31 Aug 2018 15:26:07 +0000 (11:26 -0400)
commit07530dfb63fe24c06ab4508c6cb8436896104e7c
treecb5e6007d59c1183b79e0870a19bccd3f6e17638
parent1415be543b8a1a3e2f47d4e46a48b34ce877983f
ApiComparePages: Clean up handling of slot deletion

We can't allow the main slot to be deleted. DifferenceEngine assumes it
exits.

We also shouldn't allow parameters such as `tosection-{role}` to be used
without the corresponing `totext-{role}`. This will help prevent people
from being confused into thinking that `tosection-{role}` will do
anything in that situation (as opposed to `tosection`, which did).

Bug: T203255
Change-Id: I58573bb2c1ee68e6907ef2e88385fe36e5184076
includes/api/ApiComparePages.php
includes/api/i18n/en.json
includes/api/i18n/qqq.json
tests/phpunit/includes/api/ApiComparePagesTest.php