r75654 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r75653‎ | r75654 | r75655 >
Date:17:26, 29 October 2010
Author:demon
Status:reverted (Comments)
Tags:
Comment:
(bug 22308) Search should find text in default main page immediately after setup. Based on patch by Josh Lerner
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/installer/CoreInstaller.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/installer/CoreInstaller.php
@@ -444,12 +444,13 @@
445445 try {
446446 $titleobj = Title::newFromText( wfMsgForContent( "mainpage" ) );
447447 $article = new Article( $titleobj );
448 - $article->doEdit( wfMsgForContent( 'mainpagetext' ) . "\n\n" .
449 - wfMsgForContent( 'mainpagedocfooter' ),
450 - '',
451 - EDIT_NEW,
452 - false,
453 - User::newFromName( 'MediaWiki Default' ) );
 448+ $text = wfMsgForContent( 'mainpagetext' ) . "\n\n" .
 449+ wfMsgForContent( 'mainpagedocfooter' );
 450+ $article->doEdit( $text, '', EDIT_NEW, false,
 451+ User::newFromName( 'MediaWiki Default' ) );
 452+ $u = new SearchUpdate( $titleobj->getArticleID(),
 453+ $titleobj->getPrefixedDBkey(), $text );
 454+ $u->doUpdate();
454455 } catch (MWException $e) {
455456 //using raw, because $wgShowExceptionDetails can not be set yet
456457 $status->fatal( 'config-install-mainpage-failed', $e->getMessage() );
Index: trunk/phase3/RELEASE-NOTES
@@ -372,6 +372,7 @@
373373 $wgGroupPermissions now appear on Special:ListGroupRights
374374 * (bug 23923) Special:Prefixindex no longer shows results if nothing was
375375 requested.
 376+* (bug 22308) Search now finds text in default main page immediately after setup
376377
377378 === API changes in 1.17 ===
378379 * (bug 22738) Allow filtering by action type on query=logevent.

Follow-up revisions

RevisionCommit summaryAuthorDate
r75699Revert r75654 per CR, doEdit() already takes care of search updatesdemon17:28, 30 October 2010

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r75354Revert mainpage part of r75347. Should go in its own method, with messages, p...demon14:41, 25 October 2010
r75366* DatabaseOracle - throw connection exception instead of debug+false...freakolowsky16:49, 25 October 2010

Comments

#Comment by Freakolowsky (talk | contribs)   00:19, 30 October 2010

doesn't doEdit already do that?

#Comment by 😂 (talk | contribs)   17:29, 30 October 2010

You're right. Kept the release notes entry though since you fixed it.

Status & tagging log