Merge "(bug 40154) On action=info show where this page redirects to and whether it...
[lhc/web/wiklou.git] / includes / actions / InfoAction.php
index 3adf890..37e6588 100644 (file)
@@ -203,6 +203,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'] ) ) {
@@ -258,6 +272,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() . '/' );