* @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() );
}
);
$toggles[] = 'hideminor';
+ $toggles[] = 'hidepatrolled';
if( $wgRCShowWatchingUsers )
$toggles[] = 'shownumberswatching';
$toggles[] = 'usenewrc';
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' ) ) {
$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 );
/* 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,
'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',
'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',