r80898 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r80897‎ | r80898 | r80899 >
Date:19:09, 24 January 2011
Author:demon
Status:reverted
Tags:
Comment:
Workaround null Title error in parser during main page creation. Used $wgTitle. I feel dirty
Modified paths:
  • /trunk/phase3/includes/installer/Installer.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/installer/Installer.php
@@ -1403,7 +1403,12 @@
14041404 protected function createMainpage( DatabaseInstaller &$installer ) {
14051405 $status = Status::newGood();
14061406 try {
1407 - $article = new Article( Title::newMainPage() );
 1407+ // STUPID STUPID $wgTitle. PST calls getUserSig(), which joyfully
 1408+ // calls for a parsed message and uses $wgTitle. There isn't even
 1409+ // a signature in this...
 1410+ global $wgTitle;
 1411+ $wgTitle = Title::newMainPage();
 1412+ $article = new Article( $wgTitle );
14081413 $article->doEdit( wfMsgForContent( 'mainpagetext' ) . "\n\n" .
14091414 wfMsgForContent( 'mainpagedocfooter' ),
14101415 '',

Follow-up revisions

RevisionCommit summaryAuthorDate
r81011Transforming a message uses automatically $wgTitle, which may not be set if r...platonides00:23, 26 January 2011

Status & tagging log