From ca32f08966f1b51fcb19460f0996bb0c4048e6fe Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Sat, 3 Dec 2011 13:29:22 +0100 Subject: Update to MediaWiki 1.18.0 * also update ArchLinux skin to chagnes in MonoBook * Use only css to hide our menu bar when printing --- maintenance/updateSearchIndex.php | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'maintenance/updateSearchIndex.php') diff --git a/maintenance/updateSearchIndex.php b/maintenance/updateSearchIndex.php index 97863101..eed3571c 100644 --- a/maintenance/updateSearchIndex.php +++ b/maintenance/updateSearchIndex.php @@ -55,11 +55,10 @@ class UpdateSearchIndex extends Maintenance { # We can safely delete the file when we're done though. $start = file_get_contents( 'searchUpdate.pos' ); unlink( 'searchUpdate.pos' ); + } elseif( is_readable( $posFile ) ) { + $start = file_get_contents( $posFile ); } else { - $start = @file_get_contents( $posFile ); - if ( !$start ) { - $start = wfTimestamp( TS_MW, time() - 86400 ); - } + $start = wfTimestamp( TS_MW, time() - 86400 ); } $lockTime = $this->getOption( 'l', 20 ); @@ -70,10 +69,10 @@ class UpdateSearchIndex extends Maintenance { fwrite( $file, $end ); fclose( $file ); } else { - $this->output( "*** Couldn't write to the $posFile!\n" ); + $this->error( "*** Couldn't write to the $posFile!\n" ); } } else { - $this->output( "*** Couldn't write to the $posFile!\n" ); + $this->error( "*** Couldn't write to the $posFile!\n" ); } } -- cgit v1.2.2