}
// 10 seconds server-side caching max
- $this->getOutput()->setSquidMaxage( 10 );
+ $this->getOutput()->setCdnMaxage( 10 );
// Check if the client has a cached version
$lastmod = $this->checkLastModified();
if ( $lastmod === false ) {
public function getDefaultOptions() {
$opts = parent::getDefaultOptions();
$user = $this->getUser();
+ $config = $this->getConfig();
$opts->add( 'days', $user->getIntOption( 'rcdays' ) );
$opts->add( 'limit', $user->getIntOption( 'rclimit' ) );
$opts->add( 'hideliu', false );
$opts->add( 'hidepatrolled', $user->getBoolOption( 'hidepatrolled' ) );
$opts->add( 'hidemyself', false );
- $opts->add( 'hidecategorization', $user->getBoolOption( 'hidecategorization' ) );
+
+ if ( $config->get( 'RCWatchCategoryMembership' ) ) {
+ $opts->add( 'hidecategorization', $user->getBoolOption( 'hidecategorization' ) );
+ }
$opts->add( 'categories', '' );
$opts->add( 'categories_any', false );
*
* @return array
*/
- private function getFeedQuery() {
+ protected function getFeedQuery() {
$query = array_filter( $this->getOptions()->getAllValues(), function ( $value ) {
// API handles empty parameters in a different way
return $value !== '';
$extraOpts = $this->getExtraOptions( $opts );
$extraOptsCount = count( $extraOpts );
$count = 0;
- $submit = ' ' . Xml::submitbutton( $this->msg( 'allpagessubmit' )->text() );
+ $submit = ' ' . Xml::submitbutton( $this->msg( 'recentchanges-submit' )->text() );
$out = Xml::openElement( 'table', array( 'class' => 'mw-recentchanges-table' ) );
foreach ( $extraOpts as $name => $optionRow ) {
$lang = $this->getLanguage();
$user = $this->getUser();
+ $config = $this->getConfig();
if ( $options['from'] ) {
$note .= $this->msg( 'rcnotefrom' )
->numParams( $options['limit'] )
}
# Sort data for display and make sure it's unique after we've added user data.
- $linkLimits = $this->getConfig()->get( 'RCLinkLimits' );
+ $linkLimits = $config->get( 'RCLinkLimits' );
$linkLimits[] = $options['limit'];
sort( $linkLimits );
$linkLimits = array_unique( $linkLimits );
- $linkDays = $this->getConfig()->get( 'RCLinkDays' );
+ $linkDays = $config->get( 'RCLinkDays' );
$linkDays[] = $options['days'];
sort( $linkDays );
$linkDays = array_unique( $linkDays );
'hideanons' => 'rcshowhideanons',
'hideliu' => 'rcshowhideliu',
'hidepatrolled' => 'rcshowhidepatr',
- 'hidemyself' => 'rcshowhidemine',
- 'hidecategorization' => 'rcshowhidecategorization'
+ 'hidemyself' => 'rcshowhidemine'
);
+ if ( $config->get( 'RCWatchCategoryMembership' ) ) {
+ $filters['hidecategorization'] = 'rcshowhidecategorization';
+ }
+
$showhide = array( 'show', 'hide' );
foreach ( $this->getCustomFilters() as $key => $params ) {