From 5fc20f89cbe774e33e754a40bfefa339f4402978 Mon Sep 17 00:00:00 2001 From: Alexandre Emsenhuber Date: Sun, 7 Oct 2012 15:37:00 +0200 Subject: [PATCH] Removed useless $title parameter to InfoAction::pageInfo() The $title variable is set to $this->getTitle() before its first use in that method, so it's useless to pass it as parameter. Also changed the call to exist() in InfoAction::onView() to use the Page object instead of the Title object. Change-Id: Ic07ee0ccccfd9cc3aabd497aebf7965136a2d3bd --- includes/actions/InfoAction.php | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/includes/actions/InfoAction.php b/includes/actions/InfoAction.php index e09cd20568..468e21beec 100644 --- a/includes/actions/InfoAction.php +++ b/includes/actions/InfoAction.php @@ -72,8 +72,7 @@ class InfoAction extends FormlessAction { '.mw-templatesUsedExplanation { display: none; }' ); // Get page information - $title = $this->getTitle(); - $pageInfo = $this->pageInfo( $title ); + $pageInfo = $this->pageInfo(); // Allow extensions to add additional information wfRunHooks( 'InfoAction', array( &$pageInfo ) ); @@ -96,7 +95,7 @@ class InfoAction extends FormlessAction { } // Page credits - /*if ( $title->exists() ) { + /*if ( $this->page->exists() ) { $content .= Html::rawElement( 'div', array( 'id' => 'mw-credits' ), $this->getContributors() ); }*/ @@ -146,10 +145,8 @@ class InfoAction extends FormlessAction { * Returns page information in an easily-manipulated format. Array keys are used so extensions * may add additional information in arbitrary positions. Array values are arrays with one * element to be rendered as a header, arrays with two elements to be rendered as a table row. - * - * @param $title Title object */ - protected function pageInfo( $title ) { + protected function pageInfo() { global $wgContLang, $wgDisableCounters, $wgRCMaxAge; $user = $this->getUser(); -- 2.20.1