Fix phpcs errors in includes/
[lhc/web/wiklou.git] / includes / actions / InfoAction.php
index 12e845b..9e4a150 100644 (file)
@@ -114,7 +114,7 @@ class InfoAction extends FormlessAction {
                $pageInfo = $this->pageInfo();
 
                // Allow extensions to add additional information
-               wfRunHooks( 'InfoAction', array( $this->getContext(), &$pageInfo ) );
+               Hooks::run( 'InfoAction', array( $this->getContext(), &$pageInfo ) );
 
                // Render page information
                foreach ( $pageInfo as $header => $infoTable ) {
@@ -290,7 +290,7 @@ class InfoAction extends FormlessAction {
 
                $pageInfo['header-basic'][] = array( $langDisp,
                        Language::fetchLanguageName( $pageLang, $lang->getCode() )
-                       . ' ' . $this->msg( 'parentheses', $pageLang ) );
+                       . ' ' . $this->msg( 'parentheses', $pageLang )->escaped() );
 
                // Content model of the page
                $pageInfo['header-basic'][] = array(
@@ -338,7 +338,11 @@ class InfoAction extends FormlessAction {
                                $whatLinksHere,
                                $this->msg( 'pageinfo-redirects-name' )->escaped(),
                                array(),
-                               array( 'hidelinks' => 1, 'hidetrans' => 1 )
+                               array(
+                                       'hidelinks' => 1,
+                                       'hidetrans' => 1,
+                                       'hideimages' => $title->getNamespace() == NS_FILE
+                               )
                        ),
                        $this->msg( 'pageinfo-redirects-value' )
                                ->numParams( count( $title->getRedirectsHere() ) )
@@ -386,7 +390,7 @@ class InfoAction extends FormlessAction {
                // Page protection
                $pageInfo['header-restrictions'] = array();
 
-               // Is this page effected by the cascading protection of something which includes it?
+               // Is this page affected by the cascading protection of something which includes it?
                if ( $title->isCascadeProtected() ) {
                        $cascadingFrom = '';
                        $sources = $title->getCascadeProtectionSources(); // Array deferencing is in PHP 5.4 :(
@@ -630,7 +634,6 @@ class InfoAction extends FormlessAction {
         * @return array
         */
        protected function pageCounts( Title $title ) {
-               wfProfileIn( __METHOD__ );
                $id = $title->getArticleID();
                $config = $this->context->getConfig();
 
@@ -743,8 +746,6 @@ class InfoAction extends FormlessAction {
                        __METHOD__
                );
 
-               wfProfileOut( __METHOD__ );
-
                return $result;
        }