ChangesList: Use context language for LogPage::getName() message
authorTimo Tijhof <krinklemail@gmail.com>
Tue, 8 Mar 2016 16:53:32 +0000 (16:53 +0000)
committerTimo Tijhof <krinklemail@gmail.com>
Tue, 8 Mar 2016 17:11:58 +0000 (17:11 +0000)
Was calling escaped() directly on a Message object which resulted
in a $wgLang lookup, thus ignoring the context language given to the
class constructor.

Change-Id: Ia8ce739178924299ca559088fc40a2b048d7ed72

includes/changes/ChangesList.php

index 15432da..342b31d 100644 (file)
@@ -337,7 +337,7 @@ class ChangesList extends ContextSource {
         */
        public function insertLog( &$s, $title, $logtype ) {
                $page = new LogPage( $logtype );
-               $logname = $page->getName()->escaped();
+               $logname = $page->getName()->setContext( $this->getContext() )->escaped();
                $s .= $this->msg( 'parentheses' )->rawParams( Linker::linkKnown( $title, $logname ) )->escaped();
        }