Make an empty "?action=" parameter default to "view"
authorThiemo Mättig <thiemo.maettig@wikimedia.de>
Tue, 14 Oct 2014 14:31:43 +0000 (16:31 +0200)
committerThiemo Mättig <thiemo.maettig@wikimedia.de>
Tue, 17 May 2016 16:36:39 +0000 (18:36 +0200)
commitb287ec2cc649a96bb19c893c46f88734c6392204
tree591de031a1a1c9640c54fb3115fbe5087e0fdb86
parentfc1d4d79602415d1362de9286b0729bd86d03fc1
Make an empty "?action=" parameter default to "view"

When no action is given, e.g. in
https://en.wikipedia.org/wiki/URL
the action defaults to "view". Just like you called
https://en.wikipedia.org/wiki/URL?action=view

But when the action is empty, e.g.
https://en.wikipedia.org/wiki/URL?action=
you get an error message telling you that "the action specified"
can not be "recognized". Wait, I did not "specified" an action.
That's why I left the parameter empty. From the users point of
view I expect the empty string to behave like null/undefined.

This is a resubmit of I331924d without the problematic bits.

Change-Id: I07847600bb24ae078276acf98e6eb244039414d7
includes/actions/Action.php
tests/phpunit/includes/actions/ActionTest.php