r13432 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r13431‎ | r13432 | r13433 >
Date:16:04, 2 April 2006
Author:robchurch
Status:old
Tags:
Comment:
(bug 5385) Allow hiding anonymous edits on Special:Recentchanges
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/SpecialRecentchanges.php (modified) (history)
  • /trunk/phase3/languages/Messages.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/SpecialRecentchanges.php
@@ -32,6 +32,7 @@
3333 /* int */ 'limit' => $wgUser->getDefaultOption('rclimit'),
3434 /* bool */ 'hideminor' => false,
3535 /* bool */ 'hidebots' => true,
 36+ /* bool */ 'hideanons' => false,
3637 /* bool */ 'hideliu' => false,
3738 /* bool */ 'hidepatrolled' => false,
3839 /* bool */ 'hidemyself' => false,
@@ -69,6 +70,7 @@
7071 $namespace = $wgRequest->getIntOrNull( 'namespace' );
7172 $invert = $wgRequest->getBool( 'invert', $defaults['invert'] );
7273 $hidebots = $wgRequest->getBool( 'hidebots', $defaults['hidebots'] );
 74+ $hideanons = $wgRequest->getBool( 'hideanons', $defaults['hideanons'] );
7375 $hideliu = $wgRequest->getBool( 'hideliu', $defaults['hideliu'] );
7476 $hidepatrolled = $wgRequest->getBool( 'hidepatrolled', $defaults['hidepatrolled'] );
7577 $hidemyself = $wgRequest->getBool ( 'hidemyself', $defaults['hidemyself'] );
@@ -84,6 +86,7 @@
8587 if ( 'minor' == $bit ) $hideminor = 0;
8688 if ( 'hideliu' == $bit ) $hideliu = 1;
8789 if ( 'hidepatrolled' == $bit ) $hidepatrolled = 1;
 90+ if ( 'hideanons' == $bit ) $hideanons = 1;
8891 if ( 'hidemyself' == $bit ) $hidemyself = 1;
8992
9093 if ( is_numeric( $bit ) ) {
@@ -135,6 +138,7 @@
136139 $hidem .= $hidebots ? ' AND rc_bot=0' : '';
137140 $hidem .= ( $hideliu && !$hidemyself ) ? ' AND rc_user=0' : '';
138141 $hidem .= $hidepatrolled ? ' AND rc_patrolled=0' : '';
 142+ $hidem .= ( $hideanons && !$hideliu ) ? ' AND rc_user <> 0' : '';
139143 if ( $hidemyself ) {
140144 if ( $wgUser->getID() ) {
141145 $hidem .= ' AND rc_user <> '.$wgUser->getID();
@@ -195,6 +199,7 @@
196200 wfAppendToArrayIfNotDefault( 'limit', $limit , $defaults, $nondefaults);
197201 wfAppendToArrayIfNotDefault( 'hideminor', $hideminor, $defaults, $nondefaults);
198202 wfAppendToArrayIfNotDefault( 'hidebots', $hidebots, $defaults, $nondefaults);
 203+ wfAppendToArrayIfNotDefault( 'hideanons', $hideanons, $defaults, $nondefaults );
199204 wfAppendToArrayIfNotDefault( 'hideliu', $hideliu, $defaults, $nondefaults);
200205 wfAppendToArrayIfNotDefault( 'hidepatrolled', $hidepatrolled, $defaults, $nondefaults);
201206 wfAppendToArrayIfNotDefault( 'hidemyself', $hidemyself, $defaults, $nondefaults);
@@ -500,13 +505,15 @@
501506 array( 'hideminor' => 1-$options['hideminor'] ), $nondefaults);
502507 $botLink = makeOptionsLink( $showhide[1-$options['hidebots']],
503508 array( 'hidebots' => 1-$options['hidebots'] ), $nondefaults);
 509+ $anonsLink = makeOptionsLink( $showhide[ 1 - $options['hideanons'] ],
 510+ array( 'hideanons' => 1 - $options['hideanons'] ), $nondefaults );
504511 $liuLink = makeOptionsLink( $showhide[1-$options['hideliu']],
505512 array( 'hideliu' => 1-$options['hideliu'] ), $nondefaults);
506513 $patrLink = makeOptionsLink( $showhide[1-$options['hidepatrolled']],
507514 array( 'hidepatrolled' => 1-$options['hidepatrolled'] ), $nondefaults);
508515 $myselfLink = makeOptionsLink( $showhide[1-$options['hidemyself']],
509516 array( 'hidemyself' => 1-$options['hidemyself'] ), $nondefaults);
510 - $hl = wfMsg( 'showhideminor', $minorLink, $botLink, $liuLink, $patrLink, $myselfLink );
 517+ $hl = wfMsg( 'showhideminor', $minorLink, $botLink, $liuLink, $patrLink, $myselfLink, $anonsLink );
511518
512519 // show from this onward link
513520 $now = $wgLang->timeanddate( wfTimestampNow(), true );
Index: trunk/phase3/RELEASE-NOTES
@@ -393,6 +393,7 @@
394394 * Special:Export can now export a list of all contributors to an article (off by default)
395395 * (bug 5372) Add number of files to Special:Statistics
396396 * (bug 2871) Links to talk pages in watchlist editing view
 397+* (bug 5385) Allow hiding anonymous edits on Special:Recentchanges
397398
398399 Misc.:
399400 * PHP 4.1 compatibility fix: don't use new_link parameter to mysql_connect
Index: trunk/phase3/languages/Messages.php
@@ -784,7 +784,7 @@
785785 'rcnote' => "Below are the last <strong>$1</strong> changes in last <strong>$2</strong> days.",
786786 'rcnotefrom' => "Below are the changes since <b>$2</b> (up to <b>$1</b> shown).",
787787 'rclistfrom' => "Show new changes starting from $1",
788 -'showhideminor' => "$1 minor edits | $2 bots | $3 logged in users | $4 patrolled edits",
 788+'showhideminor' => "$1 minor edits | $2 bots | $3 logged in users | $6 anonymous users | $4 patrolled edits | $5 my edits",
789789 'rclinks' => "Show last $1 changes in last $2 days<br />$3",
790790 'rchide' => "in $4 form; $1 minor edits; $2 secondary namespaces; $3 multiple edits.",
791791 'rcliu' => "; $1 edits from logged in users",

Status & tagging log