Merge "Exclude override to make method public from checks"
[lhc/web/wiklou.git] / includes / specials / SpecialRecentchanges.php
index 60cdb0e..23203ea 100644 (file)
@@ -41,16 +41,17 @@ class SpecialRecentChanges extends IncludableSpecialPage {
         */
        public function getDefaultOptions() {
                $opts = new FormOptions();
+               $user = $this->getUser();
 
-               $opts->add( 'days', $this->getUser()->getIntOption( 'rcdays' ) );
-               $opts->add( 'limit', $this->getUser()->getIntOption( 'rclimit' ) );
+               $opts->add( 'days', $user->getIntOption( 'rcdays' ) );
+               $opts->add( 'limit', $user->getIntOption( 'rclimit' ) );
                $opts->add( 'from', '' );
 
-               $opts->add( 'hideminor', $this->getUser()->getBoolOption( 'hideminor' ) );
+               $opts->add( 'hideminor', $user->getBoolOption( 'hideminor' ) );
                $opts->add( 'hidebots', true );
                $opts->add( 'hideanons', false );
                $opts->add( 'hideliu', false );
-               $opts->add( 'hidepatrolled', $this->getUser()->getBoolOption( 'hidepatrolled' ) );
+               $opts->add( 'hidepatrolled', $user->getBoolOption( 'hidepatrolled' ) );
                $opts->add( 'hidemyself', false );
 
                $opts->add( 'namespace', '', FormOptions::INTNULL );
@@ -154,7 +155,7 @@ class SpecialRecentChanges extends IncludableSpecialPage {
                $opts = $this->getOptions();
                $this->setHeaders();
                $this->outputHeader();
-               $this->addRecentChangesJS();
+               $this->addModules();
 
                // Fetch results, prepare a batch link existence check query
                $conds = $this->buildMainQueryConds( $opts );
@@ -516,8 +517,8 @@ class SpecialRecentChanges extends IncludableSpecialPage {
                }
 
                if ( $rows->numRows() === 0 ) {
-                       $this->getOutput()->wrapWikiMsg(
-                               "<div class='mw-changeslist-empty'>\n$1\n</div>", 'recentchanges-noresult'
+                       $this->getOutput()->addHtml(
+                               '<div class="mw-changeslist-empty">' . $this->msg( 'recentchanges-noresult' )->parse() . '</div>'
                        );
                } else {
                        $this->getOutput()->addHTML( $rclistOutput );
@@ -684,7 +685,6 @@ class SpecialRecentChanges extends IncludableSpecialPage {
        /**
         * Creates the choose namespace selection
         *
-        * @todo Uses radio buttons (HASHAR)
         * @param FormOptions $opts
         * @return string
         */
@@ -911,9 +911,9 @@ class SpecialRecentChanges extends IncludableSpecialPage {
        }
 
        /**
-        * Add JavaScript to the page
+        * Add page-specific modules.
         */
-       function addRecentChangesJS() {
+       protected function addModules() {
                $this->getOutput()->addModules( array(
                        'mediawiki.special.recentchanges',
                ) );