r68268 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r68267‎ | r68268 | r68269 >
Date:11:49, 19 June 2010
Author:hartman
Status:ok
Tags:
Comment:
Use the helper function Title::newMainPage() instead of newFromTitle().
Patch by User:Umherirrender
Modified paths:
  • /trunk/phase3/includes/Skin.php (modified) (history)
  • /trunk/phase3/includes/api/ApiQuerySiteinfo.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/api/ApiQuerySiteinfo.php
@@ -102,7 +102,7 @@
103103 global $wgContLang, $wgLang;
104104
105105 $data = array();
106 - $mainPage = Title::newFromText( wfMsgForContent( 'mainpage' ) );
 106+ $mainPage = Title::newMainPage();
107107 $data['mainpage'] = $mainPage->getPrefixedText();
108108 $data['base'] = $mainPage->getFullUrl();
109109 $data['sitename'] = $GLOBALS['wgSitename'];
Index: trunk/phase3/includes/Skin.php
@@ -388,7 +388,7 @@
389389 implode( "\t", $digitTransTable ),
390390 );
391391
392 - $mainPage = Title::newFromText( wfMsgForContent( 'mainpage' ) );
 392+ $mainPage = Title::newMainPage();
393393 $vars = array(
394394 'skin' => $skinName,
395395 'stylepath' => $wgStylePath,

Status & tagging log