RollbackAction: Allow 'from' to be an empty string
authorTimo Tijhof <krinklemail@gmail.com>
Wed, 7 Sep 2016 20:52:42 +0000 (13:52 -0700)
committerAaron Schulz <aschulz@wikimedia.org>
Wed, 7 Sep 2016 21:09:22 +0000 (21:09 +0000)
commitf188c23ca8a105e4bae7cd2b874eb11d9c49b733
tree5e92d490f2a06e20f3a6f4fee2ab87db5517f53a
parentfc05a13a2d144c97636588220150b8a72c976b9b
RollbackAction: Allow 'from' to be an empty string

Fix regression from 9af38c046c86, which made 'from' a required
non-empty parameter where previously an empty value was allowed.

The rollback links always include a 'from' parameter, but it is
set to an empty string by Revision::getUserText if the current
revision has its username hidden.

Test plan:
* Go to action=history, tick latest revision and "Change visibility".
* Tick "Editor's username" and apply the change.
* Hit "rollback" on the history page.
* Before: "missing parameter" error.
  After: Success.

Bug: T141985
Change-Id: I20d23e2aeec858f82231910c030c14ffa3af656f
includes/actions/RollbackAction.php
resources/src/mediawiki/page/rollback.js