$output = $this->getOutput();
$request = $this->getRequest();
$this->addHelpLink( 'Help:Watching pages' );
+ $output->addModules( array(
+ 'mediawiki.special.changeslist.visitedstatus',
+ ) );
$mode = SpecialEditWatchlist::getMode( $request, $subpage );
if ( $mode !== false ) {
);
if ( $this->getConfig()->get( 'RCWatchCategoryMembership' ) ) {
- $filters['hidecategorization'] = 'rcshowhidecategorization';
+ $filters['hidecategorization'] = 'wlshowhidecategorization';
}
foreach ( $this->getCustomFilters() as $key => $params ) {
$opts['associated'],
array( 'title' => $this->msg( 'tooltip-namespace_association' )->text() )
) . "</span>\n";
- $form .= Xml::submitButton( $this->msg( 'allpagessubmit' )->text() ) . "\n";
+ $form .= Xml::submitButton( $this->msg( 'watchlist-submit' )->text() ) . "\n";
foreach ( $hiddenFields as $key => $value ) {
$form .= Html::hidden( $key, $value ) . "\n";
}
$userWatchlistOption = (string)$this->getUser()->getOption( 'watchlistdays' );
// add the user preference, if it isn't available already
- if ( !in_array( $userWatchlistOption, $days ) ) {
+ if ( !in_array( $userWatchlistOption, $days ) && $userWatchlistOption !== '0' ) {
$days[] = $userWatchlistOption;
}
$selected = (string)$options['days'];
// add the currently selected value, if it isn't available already
- if ( !in_array( $selected, $days ) ) {
+ if ( !in_array( $selected, $days ) && $selected !== '0' ) {
$days[] = $selected;
}
// 'all' option
$name = $this->msg( 'watchlistall2' )->text();
- $value = 0;
+ $value = '0';
$select->addOption( $name, $value );
return $select->getHTML() . "\n<br />\n";
array( 'id' => 'mw-watchlist-options' )
);
- $form .= SpecialRecentChanges::makeLegend( $this->getContext() );
+ $form .= $this->makeLegend();
$this->getOutput()->addHTML( $form );
}