Request to implement a $wgAction (PHP variable). This will
A) Remove the duplication of code that redoes this in several places throughout the core and possible extensions as well
B) Make it available in CSS (bug 4438)
C) Make it available in JS (replacing the current workaround)
- Not be dependant on the action-parameter. Instead it should represent what MediaWiki actually does, and, as we know, the action parameter has nothing to do with that in many cases.
- During a view, action-param is almost never 'view'
- During a diff (which isn't an action, it's called "historysubmit"), action is only 'historysubmit' if it came from the history page (if from recentchanges, watchlist or if manaully constructed like: http://enwp.org/?diff=1 action is wrongly falling back to 'view' )
- Introduce 'diff' as a valid action and it will be implied if there's a diff-parameter just like 'view' is implied.
- Use action=diff on history submit, deprecate/remove 'historysubmit'