Show user ID on action=info
authorKunal Mehta <legoktm@member.fsf.org>
Thu, 20 Oct 2016 22:23:13 +0000 (15:23 -0700)
committerKunal Mehta <legoktm@member.fsf.org>
Thu, 20 Oct 2016 22:23:13 +0000 (15:23 -0700)
Change-Id: I43293e319e02dd388c4ee3e952962ad725ab2bab

includes/actions/InfoAction.php
languages/i18n/en.json
languages/i18n/qqq.json

index c039388..be3be85 100644 (file)
@@ -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'] ) ) {
index f30c038..3d272a3 100644 (file)
        "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",
index a934741..b4b247b 100644 (file)
        "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}}",