* Returns a title object if the page is redirected, false if there was no such special
* page, and true if it was successful.
*
- * @param $title a title object
- * @param $including output is being captured for use in {{special:whatever}}
+ * @param $title Title object
+ * @param $context RequestContext
+ * @param $including Bool output is being captured for use in {{special:whatever}}
*/
- static function executePath( &$title, $including = false ) {
+ static function executePath( &$title, RequestContext $context, $including = false ) {
global $wgOut, $wgTitle, $wgRequest;
wfProfileIn( __METHOD__ );
}
# Page exists, set the context
- $page->setContext( $wgOut->getContext() );
+ $page->setContext( $context );
# Check for redirect
if ( !$including ) {
$context->setTitle( $title );
$wgOut = $context->getOutput();
- $ret = SpecialPage::executePath( $title, true );
+ $ret = SpecialPage::executePath( $title, $context, true );
if ( $ret === true ) {
$ret = $wgOut->getHTML();
}