From: Chad Horohoe Date: Thu, 4 Jun 2009 01:10:06 +0000 (+0000) Subject: (bug 11654) updateSearchIndex.php now uses a wiki-specific position file. X-Git-Tag: 1.31.0-rc.0~41515 X-Git-Url: http://git.cyclocoop.org/%22%20.%20generer_url_ecrire%28%22auteur_infos%22%2C%22id_auteur=%24connect_id_auteur%22%29%20.%20%22?a=commitdiff_plain;h=647f1265251e9e1026bfe46d2d008a48248b05d0;p=lhc%2Fweb%2Fwiklou.git (bug 11654) updateSearchIndex.php now uses a wiki-specific position file. --- diff --git a/maintenance/updateSearchIndex.php b/maintenance/updateSearchIndex.php index f51617bb5f..571e65fe3b 100644 --- a/maintenance/updateSearchIndex.php +++ b/maintenance/updateSearchIndex.php @@ -22,7 +22,7 @@ require_once( 'updateSearchIndex.inc' ); if ( isset( $options['p'] ) ) { $posFile = $options['p']; } else { - $posFile = 'searchUpdate.pos'; + $posFile = 'searchUpdate.' . wfWikiId() . '.pos'; } if ( isset( $options['e'] ) ) { @@ -33,6 +33,11 @@ if ( isset( $options['e'] ) ) { if ( isset( $options['s'] ) ) { $start = $options['s']; +elseif( is_readable( 'searchUpdate.pos' ) ) { + # B/c to the old position file name which was hardcoded + # We can safely delete the file when we're done though. + $start = file_get_contents( 'searchUpdate.pos' ); + unlink( 'searchUpdate.pos' ); } else { $start = @file_get_contents( $posFile ); if ( !$start ) {