Merge "Add --rootpage parameter to importDump.php"
[lhc/web/wiklou.git] / includes / specials / SpecialWatchlist.php
index b5382a6..c894a79 100644 (file)
@@ -44,6 +44,9 @@ class SpecialWatchlist extends ChangesListSpecialPage {
                $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 ) {
@@ -441,7 +444,7 @@ class SpecialWatchlist extends ChangesListSpecialPage {
                );
 
                if ( $this->getConfig()->get( 'RCWatchCategoryMembership' ) ) {
-                       $filters['hidecategorization'] = 'rcshowhidecategorization';
+                       $filters['hidecategorization'] = 'wlshowhidecategorization';
                }
 
                foreach ( $this->getCustomFilters() as $key => $params ) {
@@ -502,7 +505,7 @@ class SpecialWatchlist extends ChangesListSpecialPage {
                        $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";
                }
@@ -523,13 +526,13 @@ class SpecialWatchlist extends ChangesListSpecialPage {
 
                $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;
                }
 
@@ -547,7 +550,7 @@ class SpecialWatchlist extends ChangesListSpecialPage {
 
                // 'all' option
                $name = $this->msg( 'watchlistall2' )->text();
-               $value = 0;
+               $value = '0';
                $select->addOption( $name, $value );
 
                return $select->getHTML() . "\n<br />\n";