Index: includes/specials/Preferences.php
===================================================================
--- includes/specials/Preferences.php (revision 36361)
+++ includes/specials/Preferences.php (working copy)
@@ -1014,7 +1014,7 @@
$wgOut->addHtml( wfInputLabel( wfMsg( 'prefs-watchlist-edits' ), 'wpWatchlistEdits', 'wpWatchlistEdits', 3, $this->mWatchlistEdits ) );
$wgOut->addHtml( '
' );
- $wgOut->addHtml( $this->getToggles( array( 'watchlisthideown', 'watchlisthidebots', 'watchlisthideminor' ) ) );
+ $wgOut->addHtml( $this->getToggles( array( 'watchlisthideown', 'watchlisthidebots', 'watchlisthideminor', 'watchlisthidelogs' ) ) );
if( $wgUser->isAllowed( 'createpage' ) || $wgUser->isAllowed( 'createtalk' ) )
$wgOut->addHtml( $this->getToggle( 'watchcreations' ) );
Index: includes/specials/Watchlist.php
===================================================================
--- includes/specials/Watchlist.php (revision 36361)
+++ includes/specials/Watchlist.php (working copy)
@@ -49,10 +49,11 @@
}
$defaults = array(
- /* 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' ),
+ /* 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' ),
+ /* bool */ 'hideLogs' => (int)$wgUser->getBoolOption( 'watchlisthidelogs' ),
/* ? */ 'namespace' => 'all',
);
@@ -64,12 +65,14 @@
$prefs['hideown' ] = $wgUser->getBoolOption( 'watchlisthideown' );
$prefs['hidebots'] = $wgUser->getBoolOption( 'watchlisthidebots' );
$prefs['hideminor'] = $wgUser->getBoolOption( 'watchlisthideminor' );
+ $prefs['hidelogs'] = $wgUser->getBoolOption( 'watchlisthidelogs' );
# 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'] );
+ $hideLogs = $wgRequest->getBool( 'hideLogs', $prefs['hidelogs'] );
# Get namespace value, if supplied, and prepare a WHERE fragment
$nameSpace = $wgRequest->getIntOrNull( 'namespace' );
@@ -105,11 +108,12 @@
// Dump everything here
$nondefaults = array();
- 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);
+ wfAppendToArrayIfNotDefault('days' , $days , $defaults, $nondefaults);
+ wfAppendToArrayIfNotDefault('hideOwn' , (int)$hideOwn , $defaults, $nondefaults);
+ wfAppendToArrayIfNotDefault('hideBots' , (int)$hideBots , $defaults, $nondefaults);
+ wfAppendToArrayIfNotDefault('hideMinor', (int)$hideMinor, $defaults, $nondefaults);
+ wfAppendToArrayIfNotDefault('hideLogs' , (int)$hideLogs , $defaults, $nondefaults);
+ wfAppendToArrayIfNotDefault('namespace', $nameSpace , $defaults, $nondefaults);
$hookSql = "";
if( ! wfRunHooks('BeforeWatchlist', array($nondefaults, $wgUser, &$hookSql)) ) {
@@ -143,8 +147,9 @@
# Toggles
$andHideOwn = $hideOwn ? "AND (rc_user <> $uid)" : '';
- $andHideBots = $hideBots ? "AND (rc_bot = 0)" : '';
- $andHideMinor = $hideMinor ? 'AND rc_minor = 0' : '';
+ $andHideBots = $hideBots ? 'AND (rc_bot = 0)' : '';
+ $andHideMinor = $hideMinor ? 'AND (rc_minor = 0)' : '';
+ $andHideLogs = $hideLogs ? 'AND (rc_type <> 3)' : '';
# Show watchlist header
$header = '';
@@ -196,6 +201,7 @@
$andHideOwn
$andHideBots
$andHideMinor
+ $andHideLogs
$nameSpaceClause
$hookSql
ORDER BY rc_timestamp DESC
@@ -235,6 +241,11 @@
$label = $hideMinor ? wfMsgHtml( 'watchlist-show-minor' ) : wfMsgHtml( 'watchlist-hide-minor' );
$linkBits = wfArrayToCGI( array( 'hideMinor' => 1 - (int)$hideMinor ), $nondefaults );
$links[] = $skin->makeKnownLinkObj( $thisTitle, $label, $linkBits );
+
+ # Hide/show log actions
+ $label = $hideLogs ? wfMsgHtml( 'watchlist-show-logs' ) : wfMsgHtml( 'watchlist-hide-logs' );
+ $linkBits = wfArrayToCGI( array( 'hideLogs' => 1 - (int)$hideLogs ), $nondefaults );
+ $links[] = $skin->makeKnownLinkObj( $thisTitle, $label, $linkBits );
$wgOut->addHTML( implode( ' | ', $links ) );
@@ -251,6 +262,8 @@
$form .= Xml::hidden( 'hideBots', 1 );
if( $hideMinor )
$form .= Xml::hidden( 'hideMinor', 1 );
+ if( $hideLogs )
+ $form .= Xml::hidden( 'hideLogs', 1 );
$form .= Xml::closeElement( 'form' );
$wgOut->addHtml( $form );
Index: includes/User.php
===================================================================
--- includes/User.php (revision 36361)
+++ includes/User.php (working copy)
@@ -74,6 +74,7 @@
'watchlisthideown',
'watchlisthidebots',
'watchlisthideminor',
+ 'watchlisthidelogs',
'ccmeonemails',
'diffonly',
'showhiddencats',
Index: languages/messages/MessagesEn.php
===================================================================
--- languages/messages/MessagesEn.php (revision 36361)
+++ languages/messages/MessagesEn.php (working copy)
@@ -504,6 +504,7 @@
'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-watchlisthidelogs' => 'Hide log actions 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',
@@ -2050,6 +2051,8 @@
'watchlist-hide-own' => 'Hide my edits',
'watchlist-show-minor' => 'Show minor edits',
'watchlist-hide-minor' => 'Hide minor edits',
+'watchlist-show-logs' => 'Show log actions',
+'watchlist-hide-logs' => 'Hide log actions',
# Displayed when you click the "watch" button and it is in the process of watching
'watching' => 'Watching...',