Give links to a user's suppressed edits on Special:Contribs
authorPiRSquared17 <gerritpatchuploader@gmail.com>
Thu, 27 Feb 2014 03:03:37 +0000 (03:03 +0000)
committer[[mw:User:PiRSquared17]] <gerritpatchuploader@gmail.com>
Thu, 27 Feb 2014 03:03:37 +0000 (03:03 +0000)
For users who are able to see the log, provide links to view
suppression log entries for actions done by the user. A link is also
added on Special:DeletedContributions.

This was formerly done by the Oversight extension.

Bug: 59120
Change-Id: I0e606636e80810f9917d6aa624a79f1e190297f6

includes/specials/SpecialContributions.php
includes/specials/SpecialDeletedContributions.php
languages/messages/MessagesEn.php
languages/messages/MessagesQqq.php
maintenance/language/messages.inc

index c594807..7df00e2 100644 (file)
@@ -318,6 +318,16 @@ class SpecialContributions extends IncludableSpecialPage {
                                array(),
                                array( 'page' => $userpage->getPrefixedText() )
                        );
+
+                       # Suppression log link (bug 59120)
+                       if ( $this->getUser()->isAllowed( 'suppressionlog' ) ) {
+                               $tools[] = Linker::linkKnown(
+                                       SpecialPage::getTitleFor( 'Log', 'suppress' ),
+                                       $this->msg( 'sp-contributions-suppresslog' )->escaped(),
+                                       array(),
+                                       array( 'offender' => $username )
+                               );
+                       }
                }
                # Uploads
                $tools[] = Linker::linkKnown(
index d148a50..6c3cb95 100644 (file)
@@ -427,6 +427,15 @@ class DeletedContributionsPage extends SpecialPage {
                                                'page' => $nt->getPrefixedText()
                                        )
                                );
+                               # Suppression log link (bug 59120)
+                               if ( $this->getUser()->isAllowed( 'suppressionlog' ) ) {
+                                       $tools[] = Linker::linkKnown(
+                                               SpecialPage::getTitleFor( 'Log', 'suppress' ),
+                                               $this->msg( 'sp-contributions-suppresslog' )->escaped(),
+                                               array(),
+                                               array( 'offender' => $userObj->getName() )
+                                       );
+                               }
                        }
 
                        # Uploads
index 3fffec2..917c893 100644 (file)
@@ -3254,6 +3254,7 @@ $1',
 'sp-contributions-newbies-sub'         => 'For new accounts',
 'sp-contributions-newbies-title'       => 'User contributions for new accounts',
 'sp-contributions-blocklog'            => 'block log',
+'sp-contributions-suppresslog'         => 'suppressed user contributions',
 'sp-contributions-deleted'             => 'deleted user contributions',
 'sp-contributions-uploads'             => 'uploads',
 'sp-contributions-logs'                => 'logs',
index 345bcd9..8c4ae56 100644 (file)
@@ -6188,6 +6188,9 @@ See also:
 * {{msg-mw|Sp-contributions-deleted}}
 * {{msg-mw|Sp-contributions-userrights}}
 {{Identical|Block log}}',
+'sp-contributions-suppresslog' => 'Used as a display name for a link to log entries of suppressed edits made by that user.
+
+Used as link title in [[Special:Contributions]] and in [[Special:DeletedContributions]].',
 'sp-contributions-deleted' => "This is a link anchor used in [[Special:Contributions]]/''name'', when user viewing the page has the right to delete pages, or to restore deleted pages.
 
 Used as link title in [[Special:Contributions]].
index eab6cf6..24554a2 100644 (file)
@@ -2239,6 +2239,7 @@ $wgMessageStructure = array(
                'sp-contributions-blocked-notice',
                'sp-contributions-blocked-notice-anon',
                'sp-contributions-search',
+               'sp-contributions-suppresslog',
                'sp-contributions-username',
                'sp-contributions-toponly',
                'sp-contributions-submit',