* (bug 5628) More translations for MessagesHr.php
* (bug 5595) Localisation for Bosnian language (bs)
* (bug 2910) Default view preferences for watchlists
+* Add "hide bot edits from the watchlist" user preference
== Compatibility ==
*/
$wgUseTrackbacks = false;
-/**
- * Enable filtering of robots in Special:Watchlist
- */
-
-$wgFilterRobotsWL = false;
-
/**
* Enable filtering of categories in Recentchanges
*/
$wgUser->setOption( 'imagesize', $this->mImageSize );
$wgUser->setOption( 'thumbsize', $this->mThumbSize );
$wgUser->setOption( 'underline', $this->validateInt($this->mUnderline, 0, 2) );
- $wgUser->setOption( 'watchlistdays', $this->validateFloat( $this->mWatchlistDays, 0.5, 5 ) );
+ $wgUser->setOption( 'watchlistdays', $this->validateFloat( $this->mWatchlistDays, 0, 7 ) );
# Set search namespace options
foreach( $this->mSearchNs as $i => $value ) {
$wgOut->addHTML( '<label for="wpWatchlistDays">' . wfMsgHtml( 'prefs-watchlist-days' ) . '</label> ' );
$wgOut->addHTML( '<input type="text" name="wpWatchlistDays" id="wpWatchlistDays" value="' . $this->mWatchlistDays . '" size="3" />' );
$wgOut->addHTML( '<p></p>' ); # Spacing
- $wgOut->addHTML( $this->getToggles( array( 'watchlisthideown' ) ) );
+ $wgOut->addHTML( $this->getToggles( array( 'watchlisthideown', 'watchlisthidebots' ) ) );
$wgOut->addHTML( '</fieldset>' );
# Up estimate of watched items by 15% to compensate for talk pages...
+ # Toggles
$andHideOwn = $hideOwn ? "AND (rc_user <> $uid)" : '';
- if( $wgFilterRobotsWL ) {
- $andHideBotsOptional = $hideBots ? "AND (rc_bot = 0)" : '';
- } else {
- $andHideBotsOptional = "AND rc_this_oldid=page_latest";
- }
-
+ $andHideBots = $hideBots ? "AND (rc_bot = 0)" : '';
# Show watchlist header
$header = '';
AND rc_timestamp > '$cutoff'
AND rc_cur_id=page_id
$andHideOwn
- $andHideBotsOptional
+ $andHideBots
$nameSpaceClause
ORDER BY rc_timestamp DESC";
$wgOut->addHTML( "\n" . wlCutoffLinks( $days, 'Watchlist', $nondefaults ) . "<br />\n" );
- $sk = $wgUser->getSkin();
- $s = $sk->makeKnownLink(
- $wgContLang->specialPage( 'Watchlist' ),
- (0 == $hideOwn) ? wfMsgHtml( 'wlhide' ) : wfMsgHtml( 'wlshow' ),
- wfArrayToCGI( array('hideOwn' => 1-$hideOwn ), $nondefaults ) );
- $wgOut->addHTML( wfMsgHtml( "wlhideshowown", $s ) );
-
- if( $wgFilterRobotsWL ) {
- $s = $sk->makeKnownLink(
- $wgContLang->specialPage( 'Watchlist' ),
- (0 == $hideBots) ? wfMsgHtml( 'wlhide' ) : wfMsgHtml( 'wlshow' ),
- wfArrayToCGI( array('hideBots' => 1-$hideBots ), $nondefaults ) );
- $wgOut->addHTML( wfMsgHtml( "wlhideshowbots", " $s" ) );
+ # Spit out some control panel links
+ $thisTitle = Title::makeTitle( NS_SPECIAL, 'Watchlist' );
+ $skin = $wgUser->getSkin();
+ $linkElements = array( 'hideOwn' => 'wlhideshowown', 'hideBots' => 'wlhideshowbots' );
+
+ foreach( $linkElements as $var => $msg ) {
+ $label = $$var == 0 ? wfMsgHtml( 'hide' ) : wfMsgHtml( 'show' );
+ $linkBits = wfArrayToCGI( array( $var => 1 - $$var ), $nondefaults );
+ $link = $skin->makeKnownLinkObj( $thisTitle, $label, $linkBits );
+ $links[] = wfMsgHtml( $msg, $link );
}
+ $wgOut->addHTML( implode( ' | ', $links ) );
# Form for namespace filtering
- $thisTitle = Title::makeTitle( NS_SPECIAL, 'Watchlist' );
$thisAction = $thisTitle->escapeLocalUrl();
$nsForm = "<form method=\"post\" action=\"{$thisAction}\">\n";
$nsForm .= "<label for=\"namespace\">" . wfMsg( 'namespace' ) . "</label> ";
'autopatrol',
'forceeditsummary',
'watchlisthideown',
+ 'watchlisthidebots',
);
/* private */ $wgBookstoreListEn = array(
'tog-autopatrol' => 'Mark edits I make as patrolled',
'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',
'underline-always' => 'Always',
'underline-never' => 'Never',
'wlnote' => 'Below are the last $1 changes in the last <b>$2</b> hours.',
'wlshowlast' => 'Show last $1 hours $2 days $3',
'wlsaved' => 'This is a saved version of your watchlist.',
-'wlhideshowown' => '$1 my edits.',
-'wlhideshowbots' => '$1 bot edits.',
-'wlshow' => 'Show',
-'wlhide' => 'Hide',
+'wlhideshowown' => '$1 my edits',
+'wlhideshowbots' => '$1 bot edits',
'enotif_mailer' => '{{SITENAME}} Notification Mailer',
'enotif_reset' => 'Mark all pages visited',