/** @var bool|Title */
protected $rclTargetTitle;
+ protected $rclTarget;
+
function __construct() {
parent::__construct( 'Recentchangeslinked' );
}
public function parseParameters( $par, FormOptions $opts ) {
$opts['target'] = $par;
+ $this->rclTarget = $par;
}
/**
$outputPage = $this->getOutput();
$title = Title::newFromText( $target );
if ( !$title || $title->isExternal() ) {
- $outputPage->addHTML( '<div class="errorbox">' . $this->msg( 'allpagesbadtitle' )
- ->parse() . '</div>' );
+ $outputPage->addHTML(
+ Html::errorBox( $this->msg( 'allpagesbadtitle' )->parse() )
+ );
return false;
}
public function prefixSearchSubpages( $search, $limit, $offset ) {
return $this->prefixSearchString( $search, $limit, $offset );
}
+
+ /**
+ * Get a self-referential title object
+ * with consideration to the given subpage.
+ *
+ * @return Title
+ * @since 1.23
+ */
+ public function getPageTitle() {
+ return parent::getPageTitle( $this->rclTarget );
+ }
}