(bug 16969) Add show/hide to Preferences for option on specialpages added by FlaggedRevs

This commit is contained in:
Aaron Schulz 2009-01-13 13:46:02 +00:00
parent 2e655b61ea
commit cd3efbc8aa
5 changed files with 13 additions and 5 deletions

View file

@ -1013,9 +1013,13 @@ class User {
* @return \type{\arrayof{\string}} Array of user toggle names
*/
static function getToggles() {
global $wgContLang;
global $wgContLang, $wgUseRCPatrol;
$extraToggles = array();
wfRunHooks( 'UserToggles', array( &$extraToggles ) );
if( $wgUseRCPatrol ) {
$extraToggles[] = 'hidepatrolled';
$extraToggles[] = 'watchlisthidepatrolled';
}
return array_merge( self::$mToggles, $extraToggles, $wgContLang->getExtraUserToggles() );
}

View file

@ -1093,6 +1093,7 @@ class PreferencesForm {
);
$toggles[] = 'hideminor';
$toggles[] = 'hidepatrolled';
if( $wgRCShowWatchingUsers )
$toggles[] = 'shownumberswatching';
$toggles[] = 'usenewrc';
@ -1112,7 +1113,8 @@ class PreferencesForm {
Xml::inputLabel( wfMsg( 'prefs-watchlist-edits' ), 'wpWatchlistEdits', 'wpWatchlistEdits', 3, $this->mWatchlistEdits ) . ' ' .
wfMsgHTML( 'prefs-watchlist-edits-max' ) .
'<br /><br />' .
$this->getToggles( array( 'watchlisthideminor', 'watchlisthidebots', 'watchlisthideown', 'watchlisthideanons', 'watchlisthideliu' ) )
$this->getToggles( array( 'watchlisthideminor', 'watchlisthidebots', 'watchlisthideown',
'watchlisthideanons', 'watchlisthideliu', 'watchlisthidepatrolled' ) )
);
if( $wgUser->isAllowed( 'createpage' ) || $wgUser->isAllowed( 'createtalk' ) ) {

View file

@ -23,11 +23,11 @@ class SpecialRecentChanges extends SpecialPage {
$opts->add( 'limit', (int)$wgUser->getOption( 'rclimit' ) );
$opts->add( 'from', '' );
$opts->add( 'hideminor', (bool)$wgUser->getOption( 'hideminor' ) );
$opts->add( 'hideminor', $wgUser->getBoolOption( 'hideminor' ) );
$opts->add( 'hidebots', true );
$opts->add( 'hideanons', false );
$opts->add( 'hideliu', false );
$opts->add( 'hidepatrolled', false );
$opts->add( 'hidepatrolled', $wgUser->getBoolOption( 'hidepatrolled' ) );
$opts->add( 'hidemyself', false );
$opts->add( 'namespace', '', FormOptions::INTNULL );

View file

@ -54,7 +54,7 @@ function wfSpecialWatchlist( $par ) {
/* bool */ 'hideBots' => (int)$wgUser->getBoolOption( 'watchlisthidebots' ),
/* bool */ 'hideAnons' => (int)$wgUser->getBoolOption( 'watchlisthideanons' ),
/* bool */ 'hideLiu' => (int)$wgUser->getBoolOption( 'watchlisthideliu' ),
/* bool */ 'hidePatrolled' => (int)$wgUser->getBoolOption( 'watchlisthidepatrolled' ), // TODO
/* bool */ 'hidePatrolled' => (int)$wgUser->getBoolOption( 'watchlisthidepatrolled' ),
/* bool */ 'hideOwn' => (int)$wgUser->getBoolOption( 'watchlisthideown' ),
/* ? */ 'namespace' => 'all',
/* ? */ 'invert' => false,

View file

@ -490,6 +490,7 @@ XHTML id names.
'tog-highlightbroken' => 'Format broken links <a href="" class="new">like this</a> (alternative: like this<a href="" class="internal">?</a>).',
'tog-justify' => 'Justify paragraphs',
'tog-hideminor' => 'Hide minor edits in recent changes',
'tog-hidepatrolled' => 'Hide patrolled edits in recent changes',
'tog-extendwatchlist' => 'Expand watchlist to show all applicable changes',
'tog-usenewrc' => 'Enhanced recent changes (JavaScript)',
'tog-numberheadings' => 'Auto-number headings',
@ -524,6 +525,7 @@ XHTML id names.
'tog-watchlisthideminor' => 'Hide minor edits from the watchlist',
'tog-watchlisthideliu' => 'Hide edits by logged in users from the watchlist',
'tog-watchlisthideanons' => 'Hide edits by anonymous users from the watchlist',
'tog-watchlisthidepatrolled' => 'Hide patrolled edits from the watchlist',
'tog-nolangconversion' => 'Disable variants conversion', # only translate this message to other languages if you have to change it
'tog-ccmeonemails' => 'Send me copies of e-mails I send to other users',
'tog-diffonly' => 'Do not show page content below diffs',