Clean up param handling in ApiStashEdit
authorAryeh Gregor <ayg@aryeh.name>
Mon, 6 Aug 2018 16:53:45 +0000 (19:53 +0300)
committerAaron Schulz <aschulz@wikimedia.org>
Mon, 6 Aug 2018 19:04:43 +0000 (19:04 +0000)
commit0438e942221853ac17c3de0c4214db8589a7e652
treeed9beeb4ef556258498c814569e5c6bfa171f1b3
parent7f1c3ba94a2526bba3e1bf552e7d71344f832aa3
Clean up param handling in ApiStashEdit

It doesn't make sense to submit both stashedtexthash and text, so
requireOnlyOneParameter() is correct.  This simplifies the code and
gives a more helpful error message. (Previously if both parameters were
passed, we would ignore text unless stashedtexthash was empty, in which
case we would ignore it.)

Change-Id: I306b15eefb6fd4379a3eed88d84113c2e43c4a95
includes/api/ApiStashEdit.php