r51444 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r51443‎ | r51444 | r51445 >
Date:01:10, 4 June 2009
Author:demon
Status:ok
Tags:
Comment:
(bug 11654) updateSearchIndex.php now uses a wiki-specific position file.
Modified paths:
  • /trunk/phase3/maintenance/updateSearchIndex.php (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/updateSearchIndex.php
@@ -22,7 +22,7 @@
2323 if ( isset( $options['p'] ) ) {
2424 $posFile = $options['p'];
2525 } else {
26 - $posFile = 'searchUpdate.pos';
 26+ $posFile = 'searchUpdate.' . wfWikiId() . '.pos';
2727 }
2828
2929 if ( isset( $options['e'] ) ) {
@@ -33,6 +33,11 @@
3434
3535 if ( isset( $options['s'] ) ) {
3636 $start = $options['s'];
 37+elseif( is_readable( 'searchUpdate.pos' ) ) {
 38+ # B/c to the old position file name which was hardcoded
 39+ # We can safely delete the file when we're done though.
 40+ $start = file_get_contents( 'searchUpdate.pos' );
 41+ unlink( 'searchUpdate.pos' );
3742 } else {
3843 $start = @file_get_contents( $posFile );
3944 if ( !$start ) {

Status & tagging log