(bug 40154) On action=info show where this page redirects to and whether it's a conte...
authorAlex Monk <krenair@gmail.com>
Sun, 7 Oct 2012 23:26:42 +0000 (00:26 +0100)
committerAlex Monk <krenair@gmail.com>
Sun, 14 Oct 2012 16:50:15 +0000 (17:50 +0100)
Change-Id: I17ab90af902b3b23d5c9bc23f0c71a18d1006cb8

includes/actions/InfoAction.php
languages/messages/MessagesEn.php
languages/messages/MessagesQqq.php
maintenance/language/messages.inc

index e09cd20..e74e2f7 100644 (file)
@@ -189,6 +189,20 @@ class InfoAction extends FormlessAction {
                        $this->msg( 'pageinfo-display-title' ), $displayTitle
                );
 
+               // Is it a redirect? If so, where to?
+               if ( $title->isRedirect() ) {
+                       $pageInfo['header-basic'][] = array(
+                               $this->msg( 'pageinfo-redirectsto' ),
+                               Linker::link( $this->page->getRedirectTarget() ) . ' ' .
+                               $this->msg( 'parentheses', Linker::link(
+                                       $this->page->getRedirectTarget(),
+                                       $this->msg( 'pageinfo-redirectsto-info' ),
+                                       array(),
+                                       array( 'action' => 'info' )
+                               ) )->text()
+                       );
+               }
+
                // Default sort key
                $sortKey = $title->getCategorySortKey();
                if ( !empty( $pageProperties['defaultsort'] ) ) {
@@ -244,6 +258,14 @@ class InfoAction extends FormlessAction {
                                ->numParams( count( $title->getRedirectsHere() ) )
                );
 
+               // Is it counted as a content page?
+               if ( $this->page->isCountable() ) {
+                       $pageInfo['header-basic'][] = array(
+                               $this->msg( 'pageinfo-contentpage' ),
+                               $this->msg( 'pageinfo-contentpage-yes' )
+                       );
+               }
+
                // Subpages of this page, if subpages are enabled for the current NS
                if ( MWNamespace::hasSubpages( $title->getNamespace() ) ) {
                        $prefixIndex = SpecialPage::getTitleFor( 'Prefixindex', $title->getPrefixedText() . '/' );
index bcff642..e0f2841 100644 (file)
@@ -3763,6 +3763,10 @@ This is probably caused by a link to a blacklisted external site.',
 'pageinfo-templates'           => 'Transcluded {{PLURAL:$1|template|templates}} ($1)',
 'pageinfo-footer'              => '-', # do not translate or duplicate this message to other languages
 'pageinfo-toolboxlink'         => 'Page information',
+'pageinfo-redirectsto'         => 'Redirects to',
+'pageinfo-redirectsto-info'    => 'info',
+'pageinfo-contentpage'         => 'Counted as a content page',
+'pageinfo-contentpage-yes'     => 'Yes',
 
 # Skin names
 'skinname-standard'    => 'Classic', # only translate this message to other languages if you have to change it
index 95f1083..8730a4f 100644 (file)
@@ -3507,6 +3507,10 @@ See also {{msg-mw|Anonuser}} and {{msg-mw|Siteusers}}.',
 'pageinfo-templates' => 'The list of templates transcluded within the page. Parameters:
 * $1 is the number of templates transcluded within the page.',
 'pageinfo-toolboxlink' => "Information link for the page (like 'What links here', but to action=info for the current page instead)",
+'pageinfo-redirectsto' => 'Key for the row shown if this page is a redirect.',
+'pageinfo-redirectsto-info' => 'Text to put in parentheses for the link to the action=info of the redirect target.',
+'pageinfo-contentpage' => 'Key for the row shown if this page is counted as a content page',
+'pageinfo-contentpage-yes' => 'Yes, this page is a content page',
 
 # Skin names
 'skinname-standard' => '{{optional}}
index 4d2542f..f22cbea 100644 (file)
@@ -2693,6 +2693,10 @@ $wgMessageStructure = array(
                'pageinfo-templates',
                'pageinfo-footer',
                'pageinfo-toolboxlink',
+               'pageinfo-redirectsto',
+               'pageinfo-redirectsto-info',
+               'pageinfo-contentpage',
+               'pageinfo-contentpage-yes',
        ),
        'skin' => array(
                'skinname-standard',