Matěj Suchánek has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/292784

Change subject: Add GENDER to abusefilter-log-entry-modify
......................................................................

Add GENDER to abusefilter-log-entry-modify

B/c included.

Change-Id: I7e33d1064329124755c77ffe6efbd5d572f43cb9
---
M AbuseFilter.class.php
M Views/AbuseFilterViewEdit.php
M i18n/en.json
M i18n/qqq.json
4 files changed, 12 insertions(+), 8 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/AbuseFilter 
refs/changes/84/292784/1

diff --git a/AbuseFilter.class.php b/AbuseFilter.class.php
index 845d6a0..b490873 100644
--- a/AbuseFilter.class.php
+++ b/AbuseFilter.class.php
@@ -2220,19 +2220,21 @@
         * @param $sk Skin
         * @param $args array
         * @param $filterWikilinks bool
-        * @return String
+        * @return string
         */
-       static function modifyActionText( $page, $type, $title, $sk, $args, 
$filterWikilinks ) {
+       static function modifyActionText( $page, $type, $title, $sk, array 
$args, $filterWikilinks ) {
                list( $history_id, $filter_id ) = $args;
                $details_title = SpecialPage::getTitleFor(
                        'AbuseFilter',
                        "history/$filter_id/diff/prev/$history_id"
                );
-               if ( !$filterWikilinks ) { // Plaintext? Bug 43105
+               if ( !$filterWikilinks ) { // Plaintext? T45105
                        return wfMessage(
                                'abusefilter-log-entry-modify',
                                '[[' . $title->getFullText() . ']]',
-                               '[[' . $details_title->getFullText() . ']]' 
)->text();
+                               '[[' . $details_title->getFullText() . ']]',
+                               isset( $args[2] ) ? $username : '.' // b/c
+                       )->text();
                }
 
                $filter_link = Linker::link( $title );
@@ -2241,7 +2243,9 @@
                $details_link = Linker::link( $details_title, $details_text );
 
                return wfMessage( 'abusefilter-log-entry-modify' )
-                       ->rawParams( $filter_link, $details_link )->parse();
+                       ->rawParams( $filter_link, $details_link )
+                       ->params( isset( $args[2] ) ? $username : '.' ) // b/c
+                       ->parse();
        }
 
        /**
diff --git a/Views/AbuseFilterViewEdit.php b/Views/AbuseFilterViewEdit.php
index 4b378a2..db04ae0 100644
--- a/Views/AbuseFilterViewEdit.php
+++ b/Views/AbuseFilterViewEdit.php
@@ -250,7 +250,7 @@
 
                        // Logging
                        $lp = new LogPage( 'abusefilter' );
-                       $lp->addEntry( 'modify', $this->getTitle( $new_id ), 
'', array( $history_id, $new_id ) );
+                       $lp->addEntry( 'modify', $this->getTitle( $new_id ), 
'', array( $history_id, $new_id, $user->getName() ) );
 
                        // Purge the tag list cache so the fetchAllTags hook 
applies tag changes
                        if ( isset( $actions['tag'] ) ) {
diff --git a/i18n/en.json b/i18n/en.json
index fb3421a..5bf2541 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -388,7 +388,7 @@
        "abusefilter-topnav-import": "Import filter",
        "abusefilter-log-name": "Abuse Filter log",
        "abusefilter-log-header": "This log shows a summary of changes made to 
filters.\nFor full details, see [[Special:AbuseFilter/history|the list]] of 
recent filter changes.",
-       "abusefilter-log-entry-modify": "modified $1 ($2)",
+       "abusefilter-log-entry-modify": "{{GENDER:$3|modified}} $1 ($2)",
        "abusefilter-log-noresults": "No results",
        "abusefilter-diff-title": "Differences between versions",
        "abusefilter-diff-item": "Item",
diff --git a/i18n/qqq.json b/i18n/qqq.json
index dab9ee9..008d589 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -370,7 +370,7 @@
        "abusefilter-topnav-tools": "Used as link text in the navigation 
toolbar.",
        "abusefilter-topnav-import": "Used as link text in the navigation 
toolbar.\n\nThe link points to [[Special:AbuseLog]].",
        "abusefilter-log-name": "{{doc-logpage}}",
-       "abusefilter-log-entry-modify": "Parameters:\n* $1 - a link to the 
filter\n* $2 - a link to the filter change details",
+       "abusefilter-log-entry-modify": "Parameters:\n* $1 - a link to the 
filter\n* $2 - a link to the filter change details\n* $3 - raw username, for 
GENDER support ('.' for older entries)",
        "abusefilter-log-noresults": "{{Identical|No result}}",
        "abusefilter-diff-title": "Similar to {{msg-mw|Difference}}",
        "abusefilter-diff-item": "{{Identical|Item}}",

-- 
To view, visit https://gerrit.wikimedia.org/r/292784
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7e33d1064329124755c77ffe6efbd5d572f43cb9
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/AbuseFilter
Gerrit-Branch: master
Gerrit-Owner: Matěj Suchánek <matejsuchane...@gmail.com>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to