From: Alexandre Emsenhuber Date: Sun, 7 Oct 2012 13:37:00 +0000 (+0200) Subject: Removed useless $title parameter to InfoAction::pageInfo() X-Git-Tag: 1.31.0-rc.0~22098^2 X-Git-Url: https://git.cyclocoop.org/%242?a=commitdiff_plain;h=5fc20f89cbe774e33e754a40bfefa339f4402978;p=lhc%2Fweb%2Fwiklou.git 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 --- 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();