Merge "Align "What's this" vertically"
[lhc/web/wiklou.git] / includes / specials / SpecialRecentchanges.php
index 4659b9d..547a1b0 100644 (file)
@@ -241,7 +241,6 @@ class SpecialRecentChanges extends ChangesListSpecialPage {
 
                $opts->add( 'categories', '' );
                $opts->add( 'categories_any', false );
-               $opts->add( 'tagfilter', '' );
 
                return $opts;
        }
@@ -636,7 +635,21 @@ class SpecialRecentChanges extends ChangesListSpecialPage {
 
                $message = $this->msg( 'recentchangestext' )->inContentLanguage();
                if ( !$message->isDisabled() ) {
-                       $content = $message->parse();
+                       // Parse the message in this weird ugly way to preserve the ability to include interlanguage
+                       // links in it (T172461). In the future when T66969 is resolved, perhaps we can just use
+                       // $message->parse() instead. This code is copied from Message::parseText().
+                       $parserOutput = MessageCache::singleton()->parse(
+                               $message->plain(),
+                               $this->getPageTitle(),
+                               /*linestart*/true,
+                               // Message class sets the interface flag to false when parsing in a language different than
+                               // user language, and this is wiki content language
+                               /*interface*/false,
+                               $wgContLang
+                       );
+                       $content = $parserOutput->getText();
+                       // Add only metadata here (including the language links), text is added below
+                       $this->getOutput()->addParserOutputMetadata( $parserOutput );
 
                        $langAttributes = [
                                'lang' => $wgContLang->getHtmlCode(),
@@ -991,4 +1004,12 @@ class SpecialRecentChanges extends ChangesListSpecialPage {
        protected function getCacheTTL() {
                return 60 * 5;
        }
+
+       function getDefaultLimit() {
+               return $this->getUser()->getIntOption( 'rclimit' );
+       }
+
+       function getDefaultDays() {
+               return $this->getUser()->getIntOption( 'rcdays' );
+       }
 }