$newid = $redirectArticle->insertOn( $dbw );
if ( $newid ) { // sanity
$redirectRevision = new Revision( array(
+ 'title' => $this, // for determining the default content model
'page' => $newid,
'comment' => $comment,
'content' => $redirectContent ) );
$contentHandler = ContentHandler::getForTitle( $this );
$pageLang = $contentHandler->getPageLanguage( $this );
- // Hook at the end because we don't want to override the above stuff
- wfRunHooks( 'PageContentLanguage', array( $this, &$pageLang, $wgLang ) );
return wfGetLangObj( $pageLang );
}