[Mediawiki-api] Using API within an extension causes a browser redirect?

Roan Kattouw roan.kattouw at gmail.com
Sat May 2 15:07:28 UTC 2009


2009/5/2 Adam Nielsen <a.nielsen at shikadi.net>:
>>> Unfortunately for some reason after making the call to edit the pages,
>>> instead of the browser seeing whatever I have written with
>>> $wgOut->addHTML(), the browser gets redirected to the last page that was
>>> edited.
>>>
>> This is a consequence of the lack of separation between DB and UI logic in
>> EditPage.php . Until EditPage.php is drastically rewritten, I'm afraid
>> calling action=edit internally is just not going to work :(
>
> Thanks for the quick response!  Is there any way I can somehow save the state
> before the Edit call, and restore it afterwards?  I tried it with $wgRequest
> and it didn't work, but I'm not sure exactly what I'd need to save.
>
Off the top of my head, you need to save and restore at least
$wgRequest, $wgTitle and $wgOut.

Roan Kattouw (Catrope)



More information about the Mediawiki-api mailing list