Skip to content

Commit

Permalink
Attempt to fix wrong header on redirected page
Browse files Browse the repository at this point in the history
  • Loading branch information
hexmode committed Jul 19, 2018
1 parent fc5a159 commit 77a89b1
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions HeaderFooter.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,14 @@ public static function hOutputPageParserOutput( &$op, $parserOutput ) {
return true;
}

global $wgTitle;
$title = $op->getTitle();
if ( $title->isRedirect() ) {
$article = Article::newFromID( $title->getArticleID() );
$title = $article->getRedirectTarget();
}

$ns = $wgTitle->getNsText();
$name = $wgTitle->getPrefixedDBKey();
$ns = $title->getNsText();
$name = $title->getPrefixedDBKey();

$text = $parserOutput->getText();

Expand Down Expand Up @@ -69,4 +73,4 @@ static function conditionalInclude( &$text, $disableWord, &$msgId ) {
return $msgText;
}

}
}

0 comments on commit 77a89b1

Please sign in to comment.