Make an empty "?action=" parameter default to "view"
authorThiemo Mättig <thiemo.maettig@wikimedia.de>
Thu, 17 Jul 2014 08:27:38 +0000 (10:27 +0200)
committerThiemo Mättig <thiemo.maettig@wikimedia.de>
Fri, 10 Oct 2014 19:52:07 +0000 (21:52 +0200)
commita90b7ea969b4332a6229be1c4160190a3ec79200
treea5d06081a3cf0348639c2290cc45f8a7f7de3f28
parent36892938c07ee6aa5735012e8aaddbbf40e0d799
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. It doesn't make much sense
to have an empty action name that's different from the "view"
default, right? From the users point of view I expect the empty
string to behave like null/undefined.

Change-Id: I331924d9223e597293bc8285f0c330edf08e429b
includes/MediaWiki.php
includes/actions/Action.php
includes/skins/SkinTemplate.php
tests/phpunit/includes/actions/ActionTest.php