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.
Thanks, Adam.