$wgOut->addHtml( wfInputLabel( wfMsg( 'prefs-watchlist-edits' ), 'wpWatchlistEdits', 'wpWatchlistEdits', 3, $this->mWatchlistEdits ) );
$wgOut->addHtml( '<br /><br />' );
- $wgOut->addHtml( $this->getToggles( array( 'watchlisthideown', 'watchlisthidebots' ) ) );
+ $wgOut->addHtml( $this->getToggles( array( 'watchlisthideown', 'watchlisthidebots', 'watchlisthideminor' ) ) );
$wgOut->addHtml( $this->getToggles( array( 'watchdefault', 'watchcreations', 'watchdeletion' ) ) );
$wgOut->addHtml( '</fieldset>' );
/* float */ 'days' => floatval( $wgUser->getOption( 'watchlistdays' ) ), /* 3.0 or 0.5, watch further below */
/* bool */ 'hideOwn' => (int)$wgUser->getBoolOption( 'watchlisthideown' ),
/* bool */ 'hideBots' => (int)$wgUser->getBoolOption( 'watchlisthidebots' ),
+ /* bool */ 'hideMinor' => (int)$wgUser->getBoolOption( 'watchlisthideminor' ),
/* ? */ 'namespace' => 'all',
);
$prefs['days' ] = floatval( $wgUser->getOption( 'watchlistdays' ) );
$prefs['hideown' ] = $wgUser->getBoolOption( 'watchlisthideown' );
$prefs['hidebots'] = $wgUser->getBoolOption( 'watchlisthidebots' );
+ $prefs['hideminor'] = $wgUser->getBoolOption( 'watchlisthideminor' );
# Get query variables
$days = $wgRequest->getVal( 'days', $prefs['days'] );
$hideOwn = $wgRequest->getBool( 'hideOwn', $prefs['hideown'] );
$hideBots = $wgRequest->getBool( 'hideBots', $prefs['hidebots'] );
+ $hideMinor = $wgRequest->getBool( 'hideMinor', $prefs['hideminor'] );
# Get namespace value, if supplied, and prepare a WHERE fragment
$nameSpace = $wgRequest->getIntOrNull( 'namespace' );
wfAppendToArrayIfNotDefault('days' , $days , $defaults, $nondefaults);
wfAppendToArrayIfNotDefault('hideOwn' , (int)$hideOwn , $defaults, $nondefaults);
wfAppendToArrayIfNotDefault('hideBots' , (int)$hideBots, $defaults, $nondefaults);
+ wfAppendToArrayIfNotDefault( 'hideMinor', (int)$hideMinor, $defaults, $nondefaults );
wfAppendToArrayIfNotDefault('namespace', $nameSpace , $defaults, $nondefaults);
if ( $days <= 0 ) {
# Toggles
$andHideOwn = $hideOwn ? "AND (rc_user <> $uid)" : '';
$andHideBots = $hideBots ? "AND (rc_bot = 0)" : '';
+ $andHideMinor = $hideMinor ? 'AND rc_minor = 0' : '';
# Show watchlist header
$header = '';
$andLatest
$andHideOwn
$andHideBots
+ $andHideMinor
$nameSpaceClause
ORDER BY rc_timestamp DESC
$limitWatchlist";
$linkBits = wfArrayToCGI( array( 'hideOwn' => 1 - (int)$hideOwn ), $nondefaults );
$links[] = $skin->makeKnownLinkObj( $thisTitle, $label, $linkBits );
+ # Hide/show minor edits
+ $label = $hideMinor ? wfMsgHtml( 'watchlist-show-minor' ) : wfMsgHtml( 'watchlist-hide-minor' );
+ $linkBits = wfArrayToCGI( array( 'hideMinor' => 1 - (int)$hideMinor ), $nondefaults );
+ $links[] = $skin->makeKnownLinkObj( $thisTitle, $label, $linkBits );
+
$wgOut->addHTML( implode( ' | ', $links ) );
# Form for namespace filtering
$form .= Xml::hidden( 'hideOwn', 1 );
if( $hideBots )
$form .= Xml::hidden( 'hideBots', 1 );
+ if( $hideMinor )
+ $form .= Xml::hidden( 'hideMinor', 1 );
$form .= Xml::closeElement( 'form' );
$wgOut->addHtml( $form );
'tog-forceeditsummary' => 'Prompt me when entering a blank edit summary',
'tog-watchlisthideown' => 'Hide my edits from the watchlist',
'tog-watchlisthidebots' => 'Hide bot edits from the watchlist',
+'tog-watchlisthideminor' => 'Hide minor edits from the watchlist',
'tog-nolangconversion' => 'Disable variants conversion',
'tog-ccmeonemails' => 'Send me copies of emails I send to other users',
'watchlist-hide-bots' => 'Hide bot edits',
'watchlist-show-own' => 'Show my edits',
'watchlist-hide-own' => 'Hide my edits',
+'watchlist-show-minor' => 'Show minor edits',
+'watchlist-hide-minor' => 'Hide minor edits',
'wldone' => 'Done.',
# Displayed when you click the "watch" button and it's in the process of watching
'watching' => 'Watching...',