(bug 16957) Add show/hide to Preferences for option on Special:NewPages

This commit is contained in:
Aaron Schulz 2009-01-18 00:01:58 +00:00
parent 6fb1c0146d
commit 9df8757ceb
4 changed files with 9 additions and 8 deletions

View file

@ -1020,6 +1020,7 @@ class User {
wfRunHooks( 'UserToggles', array( &$extraToggles ) );
if( $wgUseRCPatrol ) {
$extraToggles[] = 'hidepatrolled';
$extraToggles[] = 'newpageshidepatrolled';
$extraToggles[] = 'watchlisthidepatrolled';
}
return array_merge( self::$mToggles, $extraToggles, $wgContLang->getExtraUserToggles() );

View file

@ -24,7 +24,7 @@ class SpecialNewpages extends SpecialPage {
$opts = new FormOptions();
$this->opts = $opts; // bind
$opts->add( 'hideliu', false );
$opts->add( 'hidepatrolled', false );
$opts->add( 'hidepatrolled', $wgUser->getBoolOption( 'newpageshidepatrolled' ) );
$opts->add( 'hidebots', false );
$opts->add( 'hideredirs', true );
$opts->add( 'limit', (int)$wgUser->getOption( 'rclimit' ) );

View file

@ -1093,10 +1093,11 @@ class PreferencesForm {
);
$toggles[] = 'hideminor';
if( $wgUseRCPatrol )
if( $wgUseRCPatrol ) {
$toggles[] = 'hidepatrolled';
if( $wgRCShowWatchingUsers )
$toggles[] = 'shownumberswatching';
$toggles[] = 'newpageshidepatrolled';
}
if( $wgRCShowWatchingUsers ) $toggles[] = 'shownumberswatching';
$toggles[] = 'usenewrc';
$wgOut->addHTML(
@ -1106,10 +1107,8 @@ class PreferencesForm {
# Watchlist
$watchlistToggles = array( 'watchlisthideminor', 'watchlisthidebots', 'watchlisthideown',
'watchlisthideanons', 'watchlisthideliu' );
if( $wgUseRCPatrol ) {
$watchlistToggles[] = 'watchlisthidepatrolled';
}
'watchlisthideanons', 'watchlisthideliu' );
if( $wgUseRCPatrol ) $watchlistToggles[] = 'watchlisthidepatrolled';
$wgOut->addHTML(
Xml::fieldset( wfMsg( 'prefs-watchlist' ) ) .

View file

@ -491,6 +491,7 @@ XHTML id names.
'tog-justify' => 'Justify paragraphs',
'tog-hideminor' => 'Hide minor edits in recent changes',
'tog-hidepatrolled' => 'Hide patrolled edits in recent changes',
'tog-newpageshidepatrolled' => 'Hide patrolled pages from new page list',
'tog-extendwatchlist' => 'Expand watchlist to show all applicable changes',
'tog-usenewrc' => 'Enhanced recent changes (JavaScript)',
'tog-numberheadings' => 'Auto-number headings',