X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fspecials%2FSpecialRecentchangeslinked.php;h=181b4db4c9a63d85e8e941ef78a063840c04d71c;hb=8de958444f1d36ecb95d3a53d96cc1404e95468e;hp=2eeeb0b996a4605b325fee2d343f53e4ccffed95;hpb=394b04a0b208ee0f196ad73520c7cf6ed726b557;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/specials/SpecialRecentchangeslinked.php b/includes/specials/SpecialRecentchangeslinked.php index 2eeeb0b996..181b4db4c9 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,17 +293,22 @@ 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() { + $targetTitle = $this->getTargetTitle(); + if ( $targetTitle === false ) { + $this->getOutput()->addHTML( + '
' . + $this->msg( 'recentchanges-notargetpage' )->parse() . + '
' + ); + } elseif ( !$targetTitle || $targetTitle->isExternal() ) { + $this->getOutput()->addHTML( + '
' . + $this->msg( 'allpagesbadtitle' )->parse() . + '
' + ); + } else { + parent::outputNoResults(); + } } }