On 12/04/06, Jan Vanoverpelt jan.vanoverpelt@gmail.com wrote:
- When I do not put "&action=edit" in the code, the preload-parameter
does not seem to work. Can someone explain why in this code the " &action=edit" MUST be there in order for the preload-parameter to be passed?
Without the "action=edit" part, MediaWiki will attempt to view the article; this is the default action. When in this mode, the "preload" parameter is ignored; it means nothing to the code, and the value won't even be checked.
When in edit mode, however, the preload parameter *can* mean something, so the software will check for it and act as needed.
- Where in the MediaWiki source code is it possible to adapt "action=edit"?
The code that handles editing, from the start, is in includes/Wiki.php; look at MediaWiki::performAction() and the switch statement therein. This differentiates between internal and external editing, and passes off to the appropriate code. In most cases, this means a trip to the EditForm class, in includes/EditForm.php. A lot of other code is called in between; dig around.
Rob Church