X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fspecials%2FSpecialRecentchanges.php;h=23203ea5769f210fe3c8fee8d6a53ffb57fc384f;hb=8f806d211f218d785c728c76aa12ec22352bd520;hp=60cdb0e28260ecc2899b8d387ded8e1deb3af274;hpb=c93a33559f65e185dc07d823a2dbfb3ff77392fe;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/specials/SpecialRecentchanges.php b/includes/specials/SpecialRecentchanges.php index 60cdb0e282..23203ea576 100644 --- a/includes/specials/SpecialRecentchanges.php +++ b/includes/specials/SpecialRecentchanges.php @@ -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( - "
\n$1\n
", 'recentchanges-noresult' + $this->getOutput()->addHtml( + '
' . $this->msg( 'recentchanges-noresult' )->parse() . '
' ); } 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', ) );