Legoktm has uploaded a new change for review. https://gerrit.wikimedia.org/r/215280
Change subject: Show log entries of previous renames on the GlobalRenameQueue ...................................................................... Show log entries of previous renames on the GlobalRenameQueue A certain user is constantly requesting renames, so it has been requested to display previous renames on the queue view page. This will display any renames to the requesting user's current username. If the user has been in a chain of renames (A→B→C→D), only ones to the current name will be shown. Bug: T101080 Change-Id: I52ab8f7b9c712fec1fc1555b7d2e1b4ec222fcb1 --- M i18n/en.json M i18n/qqq.json M includes/specials/SpecialGlobalRenameQueue.php 3 files changed, 16 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CentralAuth refs/changes/80/215280/1 diff --git a/i18n/en.json b/i18n/en.json index 51f48dd..7232147 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -474,6 +474,7 @@ "globalrenamequeue-request-unknown-body": "The rename request was not found.", "globalrenamequeue-request-status-title": "Rename from \"$1\" to \"$2\"", "globalrenamequeue-request-antispoof-conflicts": "<strong>The chosen username is similar to {{PLURAL:$2|an existing username|existing usernames}}:</strong> $1", + "globalrenamequeue-request-previous-renames": "Previous {{PLURAL:$1|rename|renames}}", "globalrenamequeue-view": ";From:\n:[[Special:CentralAuth/$1|$1]]\n;To:\n:[[Special:CentralAuth/$2|$2]]\n;Reason:\n:$3\n;Status:\n:$4\n;Requested:\n:$5\n;Completed:\n:$6\n;Done by:\n:[$7 $8]\n;Notes:\n:$9", "globalrenamequeue-view-approved": "approved", "globalrenamequeue-view-rejected": "rejected", diff --git a/i18n/qqq.json b/i18n/qqq.json index 9ecfd37..c1a57dc 100644 --- a/i18n/qqq.json +++ b/i18n/qqq.json @@ -456,6 +456,7 @@ "globalrenamerequest-save-error": "Used as error message.", "globalrenamerequest-status-title": "Page title when request is pending.", "globalrenamequeue-request-antispoof-conflicts": "Informational message shown when a user's requested name is similar to other existing usernames. $1 is a comma separated list of usernames, $2 is the number of usernames for PLURAL support.", + "globalrenamequeue-request-previous-renames": "Text for fieldset label surrounding log entries of the requesting username's previous renames. $1 is the number of log entries for PLURAL.", "centralauth-usermerge-form-adduser": "Label on button that when clicked adds a new form field to input a username into.\n{{Identical|Add user}}", "centralauth-usermerge-form-deleteuser": "Label on button that when clicked removes the associated form field.\n{{Identical|Remove user}}", "globalrenamerequest-status-text": "Pending request description.\n\n* $1 is the user's current name\n* $2 is the user's requested name", diff --git a/includes/specials/SpecialGlobalRenameQueue.php b/includes/specials/SpecialGlobalRenameQueue.php index 03e6c14..9bfc606 100644 --- a/includes/specials/SpecialGlobalRenameQueue.php +++ b/includes/specials/SpecialGlobalRenameQueue.php @@ -345,6 +345,20 @@ } } + // Show a log entry of previous renames under the requesting user's username + $caTitle = Title::makeTitleSafe( NS_SPECIAL, 'CentralAuth/' . $req->getName() ); + $extract = ''; + $extractCount = LogEventsList::showLogExtract( $extract, 'gblrename', $caTitle, '', array( + 'showIfEmpty' => false, + ) ); + if ( $extractCount ) { + $form->addHeaderText( + Xml::fieldset( $this->msg( 'globalrenamequeue-request-previous-renames' ) + ->numParams( $extractCount ) + ->text(), $extract ) + ); + } + $reason = $req->getReason() ?: $this->msg( 'globalrenamequeue-request-reason-sul' )->parseAsBlock(); -- To view, visit https://gerrit.wikimedia.org/r/215280 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I52ab8f7b9c712fec1fc1555b7d2e1b4ec222fcb1 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/CentralAuth Gerrit-Branch: master Gerrit-Owner: Legoktm <legoktm.wikipe...@gmail.com> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits