class ApiFeedWatchlist extends ApiBase {
private $watchlistModule = null;
- private $linkToDiffs = false;
private $linkToSections = false;
/**
'meta' => 'siteinfo',
'siprop' => 'general',
'list' => 'watchlist',
- 'wlprop' => 'title|user|comment|timestamp',
+ 'wlprop' => 'title|user|comment|timestamp|ids',
'wldir' => 'older', // reverse order - from newest to oldest
'wlend' => $endTime, // stop at this time
'wllimit' => min( 50, $wgFeedLimit )
$fauxReqArr['wltype'] = $params['wltype'];
}
- // Support linking to diffs instead of article
- if ( $params['linktodiffs'] ) {
- $this->linkToDiffs = true;
- $fauxReqArr['wlprop'] .= '|ids';
- }
-
// Support linking directly to sections when possible
// (possible only if section name is present in comment)
if ( $params['linktosections'] ) {
private function createFeedItem( $info ) {
$titleStr = $info['title'];
$title = Title::newFromText( $titleStr );
- if ( $this->linkToDiffs && isset( $info['revid'] ) ) {
+ if ( isset( $info['revid'] ) ) {
$titleUrl = $title->getFullURL( array( 'diff' => $info['revid'] ) );
} else {
$titleUrl = $title->getFullURL();
ApiBase::PARAM_MIN => 1,
ApiBase::PARAM_MAX => 72,
),
- 'linktodiffs' => false,
'linktosections' => false,
);
if ( $flags ) {
return array(
'feedformat' => 'The format of the feed',
'hours' => 'List pages modified within this many hours from now',
- 'linktodiffs' => 'Link to change differences instead of article pages',
'linktosections' => 'Link directly to changed sections if possible',
'allrev' => $wldescr['allrev'],
'wlowner' => $wldescr['owner'],
public function getExamples() {
return array(
'api.php?action=feedwatchlist',
- 'api.php?action=feedwatchlist&allrev=&linktodiffs=&hours=6'
+ 'api.php?action=feedwatchlist&allrev=&hours=6'
);
}