X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fspecials%2FSpecialRecentchangeslinked.php;h=e42cc70c514d90c19ad88c52461083e21447de4d;hb=0770f85a0a293e6c7af6f1d3d3a1dbd2d13c1e09;hp=9e0daf55e5494eda26176f8ecbc4aceea034e2bc;hpb=bc6ed2ba24a8691ad6d6cc321a43720bcfb770e2;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/specials/SpecialRecentchangeslinked.php b/includes/specials/SpecialRecentchangeslinked.php index 9e0daf55e5..e42cc70c51 100644 --- a/includes/specials/SpecialRecentchangeslinked.php +++ b/includes/specials/SpecialRecentchangeslinked.php @@ -30,8 +30,6 @@ class SpecialRecentChangesLinked extends SpecialRecentChanges { /** @var bool|Title */ protected $rclTargetTitle; - protected $rclTarget; - function __construct() { parent::__construct( 'Recentchangeslinked' ); } @@ -46,7 +44,6 @@ class SpecialRecentChangesLinked extends SpecialRecentChanges { public function parseParameters( $par, FormOptions $opts ) { $opts['target'] = $par; - $this->rclTarget = $par; } /** @@ -68,7 +65,6 @@ class SpecialRecentChangesLinked extends SpecialRecentChanges { $outputPage->addHTML( Html::errorBox( $this->msg( 'allpagesbadtitle' )->parse() ) ); - return false; } @@ -297,26 +293,23 @@ class SpecialRecentChangesLinked extends SpecialRecentChanges { return $this->prefixSearchString( $search, $limit, $offset ); } - /** - * Get a self-referential title object - * with consideration to the given subpage. - * - * @param string|bool $subpage - * @return Title - * @since 1.23 - */ - public function getPageTitle( $subpage = false ) { - $subpage = $subpage ? $subpage : $this->rclTarget; - - return parent::getPageTitle( $subpage ); - } - protected function outputNoResults() { - if ( $this->getTargetTitle() === false ) { + $targetTitle = $this->getTargetTitle(); + if ( $targetTitle === false ) { + $this->getOutput()->addHTML( + Html::rawElement( + 'div', + [ 'class' => 'mw-changeslist-empty mw-changeslist-notargetpage' ], + $this->msg( 'recentchanges-notargetpage' )->parse() + ) + ); + } elseif ( !$targetTitle || $targetTitle->isExternal() ) { $this->getOutput()->addHTML( - '
' . - $this->msg( 'recentchanges-notargetpage' )->parse() . - '
' + Html::rawElement( + 'div', + [ 'class' => 'mw-changeslist-empty mw-changeslist-invalidtargetpage' ], + $this->msg( 'allpagesbadtitle' )->parse() + ) ); } else { parent::outputNoResults();