* @ingroup SpecialPage
*/
class SpecialRecentChangesLinked extends SpecialRecentChanges {
- var $rclTargetTitle;
+ /** @var bool|Title */
+ protected $rclTargetTitle;
function __construct() {
parent::__construct( 'Recentchangeslinked' );
$opts = parent::getDefaultOptions();
$opts->add( 'target', '' );
$opts->add( 'showlinkedto', false );
+
return $opts;
}
$outputPage = $this->getOutput();
$title = Title::newFromURL( $target );
if ( !$title || $title->isExternal() ) {
- $outputPage->addHtml( '<div class="errorbox">' . $this->msg( 'allpagesbadtitle' )->parse() . '</div>' );
+ $outputPage->addHtml( '<div class="errorbox">' . $this->msg( 'allpagesbadtitle' )
+ ->parse() . '</div>' );
+
return false;
}
'wl_user' => $uid,
'wl_title=rc_title',
'wl_namespace=rc_namespace'
- ));
+ ) );
}
if ( $this->getUser()->isAllowed( 'rollback' ) ) {
$tables[] = 'page';
$opts['tagfilter']
);
- if ( !wfRunHooks( 'SpecialRecentChangesQuery', array( &$conds, &$tables, &$join_conds, $opts, &$query_options, &$select ) ) ) {
+ if ( !wfRunHooks( 'SpecialRecentChangesQuery',
+ array( &$conds, &$tables, &$join_conds, $opts, &$query_options, &$select ),
+ '1.23' )
+ ) {
return false;
}
}
// field name prefixes for all the various tables we might want to join with
- $prefix = array( 'pagelinks' => 'pl', 'templatelinks' => 'tl', 'categorylinks' => 'cl', 'imagelinks' => 'il' );
+ $prefix = array(
+ 'pagelinks' => 'pl',
+ 'templatelinks' => 'tl',
+ 'categorylinks' => 'cl',
+ 'imagelinks' => 'il'
+ );
$subsql = array(); // SELECT statements to combine with UNION
foreach ( $link_tables as $link_table ) {
$pfx = $prefix[$link_table];
- // imagelinks and categorylinks tables have no xx_namespace field, and have xx_to instead of xx_title
+ // imagelinks and categorylinks tables have no xx_namespace field,
+ // and have xx_to instead of xx_title
if ( $link_table == 'imagelinks' ) {
$link_ns = NS_FILE;
} elseif ( $link_table == 'categorylinks' ) {
return $extraOpts;
}
- public function getFeedObject( $feedFormat ) {
- $feed = new ChangesFeed( $feedFormat, false );
- $feedObj = $feed->getFeedObject(
- $this->msg( 'recentchangeslinked-title', $this->getTargetTitle()->getPrefixedText() )
- ->inContentLanguage()->text(),
- $this->msg( 'recentchangeslinked-feed' )->inContentLanguage()->text(),
- $this->getPageTitle()->getFullURL()
- );
- return array( $feed, $feedObj );
- }
-
/**
* @return Title
*/
$this->rclTargetTitle = false;
}
}
+
return $this->rclTargetTitle;
}
}