diff options
author | Pierre Schmitz <pierre@archlinux.de> | 2011-12-03 13:29:22 +0100 |
---|---|---|
committer | Pierre Schmitz <pierre@archlinux.de> | 2011-12-03 13:29:22 +0100 |
commit | ca32f08966f1b51fcb19460f0996bb0c4048e6fe (patch) | |
tree | ec04cc15b867bc21eedca904cea9af0254531a11 /maintenance/updateSearchIndex.php | |
parent | a22fbfc60f36f5f7ee10d5ae6fe347340c2ee67c (diff) |
Update to MediaWiki 1.18.0
* also update ArchLinux skin to chagnes in MonoBook
* Use only css to hide our menu bar when printing
Diffstat (limited to 'maintenance/updateSearchIndex.php')
-rw-r--r-- | maintenance/updateSearchIndex.php | 11 |
1 files changed, 5 insertions, 6 deletions
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" ); } } |