summaryrefslogtreecommitdiff
path: root/maintenance/updateSearchIndex.php
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2011-12-03 13:29:22 +0100
committerPierre Schmitz <pierre@archlinux.de>2011-12-03 13:29:22 +0100
commitca32f08966f1b51fcb19460f0996bb0c4048e6fe (patch)
treeec04cc15b867bc21eedca904cea9af0254531a11 /maintenance/updateSearchIndex.php
parenta22fbfc60f36f5f7ee10d5ae6fe347340c2ee67c (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.php11
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" );
}
}