From: Kunal Mehta Date: Thu, 20 Oct 2016 22:23:13 +0000 (-0700) Subject: Show user ID on action=info X-Git-Tag: 1.31.0-rc.0~5055^2 X-Git-Url: http://git.heureux-cyclage.org/?a=commitdiff_plain;h=edde5b63a0aca41adfe66ad9d465e11cf8857478;p=lhc%2Fweb%2Fwiklou.git Show user ID on action=info Change-Id: I43293e319e02dd388c4ee3e952962ad725ab2bab --- diff --git a/includes/actions/InfoAction.php b/includes/actions/InfoAction.php index c039388783..be3be85e43 100644 --- a/includes/actions/InfoAction.php +++ b/includes/actions/InfoAction.php @@ -294,6 +294,16 @@ class InfoAction extends FormlessAction { $modelHtml ]; + if ( $title->inNamespace( NS_USER ) ) { + $pageUser = User::newFromName( $title->getRootText() ); + if ( $pageUser && $pageUser->getId() && !$pageUser->isHidden() ) { + $pageInfo['header-basic'][] = [ + $this->msg( 'pageinfo-user-id' ), + $pageUser->getId() + ]; + } + } + // Search engine status $pOutput = new ParserOutput(); if ( isset( $pageProperties['noindex'] ) ) { diff --git a/languages/i18n/en.json b/languages/i18n/en.json index f30c038ccd..3d272a311a 100644 --- a/languages/i18n/en.json +++ b/languages/i18n/en.json @@ -2860,6 +2860,7 @@ "pageinfo-category-pages": "Number of pages", "pageinfo-category-subcats": "Number of subcategories", "pageinfo-category-files": "Number of files", + "pageinfo-user-id": "User ID", "markaspatrolleddiff": "Mark as patrolled", "markaspatrolledlink": "[$1]", "markaspatrolledtext": "Mark this page as patrolled", diff --git a/languages/i18n/qqq.json b/languages/i18n/qqq.json index a9347411d0..b4b247b3b8 100644 --- a/languages/i18n/qqq.json +++ b/languages/i18n/qqq.json @@ -3044,6 +3044,7 @@ "pageinfo-category-pages": "See also:\n* {{msg-mw|Pageinfo-category-subcats}}\n* {{msg-mw|Pageinfo-category-files}}\n{{Identical|Number of pages}}", "pageinfo-category-subcats": "See also:\n* {{msg-mw|Pageinfo-category-pages}}\n* {{msg-mw|Pageinfo-category-files}}", "pageinfo-category-files": "See also:\n* {{msg-mw|Pageinfo-category-pages}}\n* {{msg-mw|Pageinfo-category-subcats}}", + "pageinfo-user-id": "The numeric ID for a user", "markaspatrolleddiff": "{{doc-actionlink}}\nSee also:\n* {{msg-mw|Markaspatrolledtext}}\n{{Identical|Mark as patrolled}}", "markaspatrolledlink": "{{notranslate}}\nParameters:\n* $1 - link which has text {{msg-mw|Markaspatrolledtext}}", "markaspatrolledtext": "{{doc-actionlink}}\nSee also:\n* {{msg-mw|Markaspatrolleddiff}}",