Hi Rob,
I've tried your method and it's the same as omitting an action all together, which posts to PHP_SELF. The form ends up redirecting to a bad title page:
Bad title
From MedLime
Jump to: navigation, search
The requested page title was invalid, empty, or an incorrectly linked inter-language or inter-wiki title. It may contain one or more characters which cannot be used in titles.
Return to Main Page.
- Steve
Rob Church wrote:
On 16/04/07, Steve Finkelstein sf@stevefink.net wrote:
$wgOut->addHTML('<form method="POST"
action="'.$_SERVER['PHP_SELF'].'">');
Variables won't be interpolated inside single quotes. Use something like:
global $wgTitle; $action = $wgTitle->escapeLocalUrl(); $wgOut->addHtml( "<form method="post" action="{$action}">" );
[The use of $wgTitle, or another constructed Title object representing the special page, is the standard method of obtaining a canonical URL in MediaWiki.]
Rob Church
MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org http://lists.wikimedia.org/mailman/listinfo/mediawiki-l
!DSPAM:1020,462331af64813712038390!