This might work (but it's a tad bit hackier than working through the
Article object, which would be ideal):
global $wgOut;
$redirectTarget = Title::newFromText('Special:SomePage');
$wgOut->header( 'Location: ' . $redirectTarget->getFullURL() );
die();
Disclaimer: I have not tested the above, so it may not work :/
-- Jim R. Wilson (jimbojw)
On 11/1/07, Travis Derouin <travis(a)wikihow.com> wrote:
It doesn't seem possible to set a redirect from
function that uses the
ArticleSaveComplete hook, because the Article object then resets it
later on after the hook is run.
Is there a way around this? Can we add a feature to Article that
overrides this?
I'm implementing a feature that does a check after the article has
been saved. In this case, if there are missing images it'll redirect
the user to a special page that will prompt the user for a few
options, but right now the Article object is clearing the redirect.
Thanks
Travis
_______________________________________________
Wikitech-l mailing list
Wikitech-l(a)lists.wikimedia.org
http://lists.wikimedia.org/mailman/listinfo/wikitech-l