$feedTitle, htmlspecialchars( $description ), $wgTitle->getFullUrl() );
}
- public function execute( $feed, $rows, $limit = 0 , $hideminor = false, $lastmod = false ) {
+ public function execute( $feed, $rows, $limit=0, $hideminor=false, $lastmod=false, $target='' ) {
global $messageMemc, $wgFeedCacheTimeout;
global $wgFeedClasses, $wgSitename, $wgContLanguageCode;
}
$timekey = wfMemcKey( $this->type, $this->format, 'timestamp' );
- $key = wfMemcKey( $this->type, $this->format, 'limit', $limit, 'minor', $hideminor );
+ $key = wfMemcKey( $this->type, $this->format, $limit, $hideminor, $target );
FeedUtils::checkPurge($timekey, $key);
public function feedSetup() {
global $wgFeedLimit, $wgRequest;
$opts = $this->getDefaultOptions();
- $opts->fetchValuesFromRequest( $wgRequest, array( 'days', 'limit', 'hideminor' ) );
+ # Feed is cached on limit,hideminor; other params would randomly not work
+ $opts->fetchValuesFromRequest( $wgRequest, array( 'limit', 'hideminor' ) );
$opts->validateIntBounds( 'limit', 0, $wgFeedLimit );
return $opts;
}
}
$batch->execute();
}
-
+ $target = isset($opts['target']) ? $opts['target'] : ''; // RCL has targets
if( $feedFormat ) {
list( $feed, $feedObj ) = $this->getFeedObject( $feedFormat );
- $feed->execute( $feedObj, $rows, $opts['limit'], $opts['hideminor'], $lastmod );
+ $feed->execute( $feedObj, $rows, $opts['limit'], $opts['hideminor'], $lastmod, $target );
} else {
$this->webOutput( $rows, $opts );
}
$opts['target'] = $par;
}
- public function feedSetup(){
+ public function feedSetup() {
global $wgRequest;
$opts = parent::feedSetup();
+ # Feed is cached on limit,hideminor,target; other params would randomly not work
$opts['target'] = $wgRequest->getVal( 'target' );
return $opts;
}
}
}
- $subsql[] = $dbr->selectSQLText( array_merge( $tables, array( $link_table ) ), $select, $conds + $subconds,
- __METHOD__, array( 'ORDER BY' => 'rc_timestamp DESC', 'LIMIT' => $limit ),
- $join_conds + array( $link_table => array( 'INNER JOIN', $subjoin ) ) );
+ $subsql[] = $dbr->selectSQLText(
+ array_merge( $tables, array( $link_table ) ),
+ $select,
+ $conds + $subconds,
+ __METHOD__,
+ array( 'ORDER BY' => 'rc_timestamp DESC', 'LIMIT' => $limit ),
+ $join_conds + array( $link_table => array( 'INNER JOIN', $subjoin ) )
+ );
}
if( count($subsql) == 0 )