Page MenuHomePhabricator

Hide your own edits on the watchlist
Closed, ResolvedPublic

Description

Author: creidieki+wikibugs

Description:
It would be really convenient if there were an option to ignore pages that you
were the most recent contributor to when looking at your watchlist. I imagine
it would be something like the "hide/show minor edits" option on the Recent
Changes page.


Version: unspecified
Severity: enhancement

Details

Reference
bz190

Revisions and Commits

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 6:41 PM
bzimport set Reference to bz190.
bzimport added a subscriber: Unknown Object (MLST).

richholton wrote:

This should do the trick. Changes to two files:

To SpecialWatchlist:
18c18

< global $wgUser, $wgOut, $wgLang, $wgTitle, $wgMemc, $wgRequest;

global $wgUser, $wgOut, $wgLang, $wgTitle, $wgMemc, $wgRequest, $wgContLang;;

40c40,41

<

$hideOwn = $wgRequest->getVal( 'hideOwn' );

106a108,111

if (is_null( $hideOwn) ) {

  1. default is false (don't hide own edits)
		$hideOwn = 0;

}

155c160,165

<

if ($hideOwn == 0)

		$w = "";

else

		$w = "AND (cur_user <> $uid)";

165a176

$w

183c194,203

<

$sk = $wgUser->getSkin();
$s = $sk->makeKnownLink(

		$wgContLang->specialPage( "Watchlist" ),
		($hideOwn==0) ? wfMsg("wlhide") : wfMsg("wlshow"),	
	  	"hideOwn=" . $wgLang->formatNum( 1-$hideOwn) );

$note = wfMsg("wlhideshowown", $s);
$wgOut->addHTML( "\n<br />{$note}\n<br />" );

To: Language.php
1167c1167,1169

<

'wlhideshowown' => "$1 my edits.",
'wlshow' => "Show",
'wlhide' => "Hide",

When posting patches on bugzilla, please note a couple things:

  • Always attach them as files, not as comments. Comments don't

format correctly, take up lots of screen space, and are harder to
keep track of.

  • Always post diffs in unified format (diff -u or cvs diff -u). This

format is easier to read and easier to apply if the file has changed
since the version you sourced from.

  • Resolving a bug as 'WORKSFORME' means that you can't replicate

the problem, in which case no patch would be necessary.

richholton wrote:

changes needed to SpecialWatchlist.php

Here's a patch file (diff -u) for SpecialWatchlist.php.
Also requires the patch to Language.php (follows).

Attached:

richholton wrote:

patch (diff -u) for Language.php

The patch for Language.php. Goes with the above patch to SpecialWatchlist.php

Attached:

jeluf wrote:

Implemented in CVS HEAD (aka 1.5)

avarab wrote:

Marking it as FIXED

gangleri wrote:

The benefits for solving this bug are similar to those fixing bug 1417 (Hide own
edits from [[Special:Recentchanges]]) where a patch is available. It would be
nice if both would come together soon.

I realised that the values for &hideOwn and &days are not preserved when
clicking on the related links.
&hideOwn=1&days=7 must be "hacked" manualy into the URL.

Regards Reinhardt

epriestley added a commit: Unknown Object (Diffusion Commit).Mar 4 2015, 8:19 AM