Simetrical wrote:
On 1/4/08, catrope@svn.wikimedia.org catrope@svn.wikimedia.org wrote:
Revision: 29261 . . .
- Unbroke Special:Userrights for wikis without pretty URLs
** This probably shouldn't be hard-coded the way I did it . . .
$form .= Xml::hidden( 'title', 'Special:Userrights' );
Strange. I'm not sure how to fix this more correctly. You would think that action="http://example.com/w/index.php?title=Special:Userrights" plus a parameter user=Username would give a URL of http://example.com/w/index.php?title=Special:Userrights&user=Username, appending the parameters to the URL correctly, but you're right, it seems to give http://example.com/w/index.php?user=Username.
I'm not sure if the spec says anything on this, but in practice any query string on the form action URL gets stripped on GET requests, replaced with the newly constructed one.
GET-based forms that aim to a specific page thus should point at $wgScript as the action and put in the title separately as a hidden field.
(I fixed the fix for this in my last commit.)
In theory we could change the behavior to check if an submission article path is in 'pretty' style and split up the title appropriately between the action URL and the form contents. If we do so it might also be wise to start using action=submit more consistently, and/or give the option of a separate submit path in $wgActionPaths.
Just thinking out load. :)
-- brion