* (bug 57098) SpecialPasswordReset now obeys returnto parameter
* (bug 37812) ResourceLoader will notice when a module's definition changes and
recompile it accordingly.
+* (bug 57201) SpecialRecentChangesFilters hook is now executed for feeds
=== API changes in 1.23 ===
* (bug 54884) action=parse&prop=categories now indicates hidden and missing
* action=parse&prop=languageshtml was deprecated in 1.18 and will be removed in
MediaWiki 1.24.
* action=parse now has disabletoc flag to disable table of contents in output.
+* SpecialRecentChanges::feedSetup() was removed.
=== Languages updated in 1.23===
var $rcOptions, $rcSubpage;
protected $customFilters;
+ /**
+ * The feed format to output as (either 'rss' or 'atom'), or null if no
+ * feed output was requested
+ *
+ * @var string $feedFormat
+ */
+ protected $feedFormat;
+
public function __construct( $name = 'Recentchanges' ) {
parent::__construct( $name );
}
* Create a FormOptions object with options as specified by the user
*
* @param array $parameters
- *
* @return FormOptions
*/
public function setup( $parameters ) {
+ global $wgFeedLimit;
+
$opts = $this->getDefaultOptions();
foreach ( $this->getCustomFilters() as $key => $params ) {
$this->parseParameters( $parameters, $opts );
}
- $opts->validateIntBounds( 'limit', 0, 5000 );
+ $opts->validateIntBounds( 'limit', 0, $this->feedFormat ? $wgFeedLimit : 5000 );
return $opts;
}
return $this->customFilters;
}
- /**
- * Create a FormOptions object specific for feed requests and return it
- *
- * @return FormOptions
- */
- public function feedSetup() {
- global $wgFeedLimit;
- $opts = $this->getDefaultOptions();
- $opts->fetchValuesFromRequest( $this->getRequest() );
- $opts->validateIntBounds( 'limit', 0, $wgFeedLimit );
-
- return $opts;
- }
-
/**
* Get the current FormOptions for this request
*/
public function getOptions() {
if ( $this->rcOptions === null ) {
- if ( $this->including() ) {
- $isFeed = false;
- } else {
- $isFeed = (bool)$this->getRequest()->getVal( 'feed' );
- }
- $this->rcOptions = $isFeed ? $this->feedSetup() : $this->setup( $this->rcSubpage );
+ $this->rcOptions = $this->setup( $this->rcSubpage );
}
return $this->rcOptions;
*/
public function execute( $subpage ) {
$this->rcSubpage = $subpage;
- $feedFormat = $this->including() ? null : $this->getRequest()->getVal( 'feed' );
+ $this->feedFormat = $this->including() ? null : $this->getRequest()->getVal( 'feed' );
# 10 seconds server-side caching max
$this->getOutput()->setSquidMaxage( 10 );
# Check if the client has a cached version
- $lastmod = $this->checkLastModified( $feedFormat );
+ $lastmod = $this->checkLastModified( $this->feedFormat );
if ( $lastmod === false ) {
return;
}
return;
}
- if ( !$feedFormat ) {
+ if ( !$this->feedFormat ) {
$batch = new LinkBatch;
foreach ( $rows as $row ) {
$batch->add( NS_USER, $row->rc_user_text );
}
$batch->execute();
}
- if ( $feedFormat ) {
- list( $changesFeed, $formatter ) = $this->getFeedObject( $feedFormat );
+ if ( $this->feedFormat ) {
+ list( $changesFeed, $formatter ) = $this->getFeedObject( $this->feedFormat );
/** @var ChangesFeed $changesFeed */
$changesFeed->execute( $formatter, $rows, $lastmod, $opts );
} else {