X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Factions%2FInfoAction.php;h=11b8badabfcc4e46e8d2c97ab35bc545e7c6d1d1;hb=74d04edec385aa86ee01943b9a27475d79f74e78;hp=e77cdf77c87658312d46af993d003cbf89901417;hpb=f6fee6ff0f244c38750fdce5ce97035020b52261;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/actions/InfoAction.php b/includes/actions/InfoAction.php index e77cdf77c8..11b8badabf 100644 --- a/includes/actions/InfoAction.php +++ b/includes/actions/InfoAction.php @@ -207,8 +207,6 @@ class InfoAction extends FormlessAction { * @return array */ protected function pageInfo() { - global $wgContLang; - $services = MediaWikiServices::getInstance(); $user = $this->getUser(); @@ -235,13 +233,14 @@ class InfoAction extends FormlessAction { ]; // Is it a redirect? If so, where to? - if ( $title->isRedirect() ) { + $redirectTarget = $this->page->getRedirectTarget(); + if ( $redirectTarget !== null ) { $pageInfo['header-basic'][] = [ $this->msg( 'pageinfo-redirectsto' ), - $linkRenderer->makeLink( $this->page->getRedirectTarget() ) . + $linkRenderer->makeLink( $redirectTarget ) . $this->msg( 'word-separator' )->escaped() . $this->msg( 'parentheses' )->rawParams( $linkRenderer->makeLink( - $this->page->getRedirectTarget(), + $redirectTarget, $this->msg( 'pageinfo-redirectsto-info' )->text(), [], [ 'action' => 'info' ] @@ -607,7 +606,7 @@ class InfoAction extends FormlessAction { $wordIDs = $magicWords->names; // Array of IDs => localized magic words - $localizedWords = $wgContLang->getMagicWords(); + $localizedWords = $services->getContentLanguage()->getMagicWords(); $listItems = []; foreach ( $pageProperties as $property => $value ) {