Last modified: 2010-05-15 15:38:08 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T6517, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 4517 - Remove my edits from Recent Changes
Remove my edits from Recent Changes
Status: RESOLVED DUPLICATE of bug 1417
Product: MediaWiki
Classification: Unclassified
Special pages (Other open bugs)
1.5.x
PC Windows XP
: Normal enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2006-01-07 16:10 UTC by Tony Bowden
Modified: 2010-05-15 15:38 UTC (History)
0 users

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
Proper version of patch (2.80 KB, patch)
2006-01-07 16:11 UTC, Tony Bowden
Details

Description Tony Bowden 2006-01-07 16:10:06 UTC
There are often times when I would like to remove my own edits from the Recent
Changes list, particularly on a wiki installation with not many active users.

I've made a small patch to SpecialRecentchanges for this, attached below.

This also, of course, requires extending MediaWiki:Showhideminor. I added '| $5
my edits' to the end of the default version.
--- SpecialRecentchanges.php    2006-01-07 16:09:10.000000000 +0000
+++ /tmp/QEG    2006-01-07 16:08:59.000000000 +0000
@@ -31,6 +31,7 @@
        /* int  */ 'limit' => $wgUser->getDefaultOption('rclimit'),
        /* bool */ 'hideminor' => false,
        /* bool */ 'hidebots' => true,
+       /* bool */ 'hideme' => false,
        /* bool */ 'hideliu' => false,
        /* bool */ 'hidepatrolled' => false,
        /* text */ 'from' => '',
@@ -67,6 +68,7 @@
                $namespace = $wgRequest->getIntOrNull( 'namespace' );
                $invert = $wgRequest->getBool( 'invert', $defaults['invert'] );
                $hidebots = $wgRequest->getBool( 'hidebots',
$defaults['hidebots'] );
+               $hideme = $wgRequest->getBool( 'hideme', $defaults['hideme'] );
                $hideliu = $wgRequest->getBool( 'hideliu', $defaults['hideliu'] );
                $hidepatrolled = $wgRequest->getBool( 'hidepatrolled',
$defaults['hidepatrolled'] );
                $from = $wgRequest->getVal( 'from', $defaults['from'] );
@@ -80,6 +82,7 @@
                                if ( 'hideminor' == $bit ) $hideminor = 1;
                                if ( 'minor' == $bit ) $hideminor = 0;
                                if ( 'hideliu' == $bit ) $hideliu = 1;
+                               if ( 'hideme' == $bit ) $hideme = 1;
                                if ( 'hidepatrolled' == $bit ) $hidepatrolled = 1;

                                if ( is_numeric( $bit ) ) {
@@ -127,7 +130,10 @@
                }
        }

+       $uid = $wgUser->getID();
+
        $hidem  = $hideminor ? 'AND rc_minor=0' : '';
+       $hidem .= $hideme ? " AND rc_user != $uid" : '';
        $hidem .= $hidebots ? ' AND rc_bot=0' : '';
        $hidem .= $hideliu ? ' AND rc_user=0' : '';
        $hidem .= $hidepatrolled ? ' AND rc_patrolled=0' : '';
@@ -135,7 +141,6 @@

        // This is the big thing!

-       $uid = $wgUser->getID();
         $notifts = ($wgShowUpdatedMarker?",wl_notificationtimestamp":"");

        // Perform query
@@ -183,6 +188,7 @@
                        wfAppendToArrayIfNotDefault( 'hidebots', $hidebots,
$defaults, $nondefaults);
                        wfAppendToArrayIfNotDefault( 'hideliu', $hideliu,
$defaults, $nondefaults);
                        wfAppendToArrayIfNotDefault( 'hidepatrolled',
$hidepatrolled, $defaults, $nondefaults);
+                       wfAppendToArrayIfNotDefault( 'hideme', $hideme,
$defaults, $nondefaults);
                        wfAppendToArrayIfNotDefault( 'from', $from, $defaults,
$nondefaults);
                        wfAppendToArrayIfNotDefault( 'namespace', $namespace,
$defaults, $nondefaults);
                        wfAppendToArrayIfNotDefault( 'invert', $invert,
$defaults, $nondefaults);
@@ -430,8 +436,10 @@
                array( 'hideliu' => 1-$options['hideliu'] ), $nondefaults);
        $patrLink  = makeOptionsLink( $showhide[1-$options['hidepatrolled']],
                array( 'hidepatrolled' => 1-$options['hidepatrolled'] ),
$nondefaults);
+       $meLink  = makeOptionsLink( $showhide[1-$options['hideme']],
+               array( 'hideme' => 1-$options['hideme'] ), $nondefaults);

-       $hl = wfMsg( 'showhideminor', $minorLink, $botLink, $liuLink, $patrLink );
+       $hl = wfMsg( 'showhideminor', $minorLink, $botLink, $liuLink, $patrLink,
$meLink  );

        // show from this onward link
        $now = $wgLang->timeanddate( wfTimestampNow(), true );
Comment 1 Tony Bowden 2006-01-07 16:11:48 UTC
Created attachment 1273 [details]
Proper version of patch

Sorry for inline patch - I didn't see how to attach it originally.
Comment 2 Brion Vibber 2006-01-07 19:43:43 UTC

*** This bug has been marked as a duplicate of 1417 ***

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links