[Mediawiki-api] Using API within an extension causes a browser redirect?
Adam Nielsen
a.nielsen at shikadi.net
Sun May 3 14:00:00 UTC 2009
>> Well I saved/restored $wgOut, $wgRequest and $wgTitle but it had no effect.
>> Looking through the API, it looks like it already does this to some extent:
>>
>> # Fake $wgRequest for some hooks inside EditPage
>> # FIXME: This interface SUCKS
>> $oldRequest = $wgRequest;
>> $wgRequest = $req;
>>
>> So it looks like more hunting will be required to find out exactly what needs
>> to be saved.
>>
> Yeah, I noticed the API already saves $wgRequest. Could you try doing
> $wgOut->disable(); after saving $wgOut?
Hmm, well that stops the output and leaves me with a blank page (no HTML or
anything.) The URL contains the correct address though (of my Special page,
it hasn't changed to the URL of the last page edited.)
I wonder why the output doesn't seem to get enabled again after restoring
$wgOut? No errors about headers or anything being set already...
Cheers,
Adam.
More information about the Mediawiki-api
mailing list