dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge "objectcache: add WANObjectCache::STALE_TTL_NONE constant"
[lhc/web/wiklou.git]
/
maintenance
/
rebuildFileCache.php
diff --git
a/maintenance/rebuildFileCache.php
b/maintenance/rebuildFileCache.php
index
04ac967
..
0b5b9b0
100644
(file)
--- a/
maintenance/rebuildFileCache.php
+++ b/
maintenance/rebuildFileCache.php
@@
-60,25
+60,26
@@
class RebuildFileCache extends Maintenance {
global $wgRequestTime;
if ( !$this->enabled ) {
global $wgRequestTime;
if ( !$this->enabled ) {
- $this->
error( "Nothing to do -- \$wgUseFileCache is disabled.", true
);
+ $this->
fatalError( "Nothing to do -- \$wgUseFileCache is disabled."
);
}
$start = $this->getOption( 'start', "0" );
if ( !ctype_digit( $start ) ) {
}
$start = $this->getOption( 'start', "0" );
if ( !ctype_digit( $start ) ) {
- $this->
error( "Invalid value for start parameter.", true
);
+ $this->
fatalError( "Invalid value for start parameter."
);
}
$start = intval( $start );
$end = $this->getOption( 'end', "0" );
if ( !ctype_digit( $end ) ) {
}
$start = intval( $start );
$end = $this->getOption( 'end', "0" );
if ( !ctype_digit( $end ) ) {
- $this->
error( "Invalid value for end parameter.", true
);
+ $this->
fatalError( "Invalid value for end parameter."
);
}
$end = intval( $end );
$this->output( "Building content page file cache from page {$start}!\n" );
$dbr = $this->getDB( DB_REPLICA );
}
$end = intval( $end );
$this->output( "Building content page file cache from page {$start}!\n" );
$dbr = $this->getDB( DB_REPLICA );
- $overwrite = $this->getOption( 'overwrite', false );
+ $batchSize = $this->getBatchSize();
+ $overwrite = $this->hasOption( 'overwrite' );
$start = ( $start > 0 )
? $start
: $dbr->selectField( 'page', 'MIN(page_id)', false, __METHOD__ );
$start = ( $start > 0 )
? $start
: $dbr->selectField( 'page', 'MIN(page_id)', false, __METHOD__ );
@@
-86,15
+87,15
@@
class RebuildFileCache extends Maintenance {
? $end
: $dbr->selectField( 'page', 'MAX(page_id)', false, __METHOD__ );
if ( !$start ) {
? $end
: $dbr->selectField( 'page', 'MAX(page_id)', false, __METHOD__ );
if ( !$start ) {
- $this->
error( "Nothing to do.", true
);
+ $this->
fatalError( "Nothing to do."
);
}
$_SERVER['HTTP_ACCEPT_ENCODING'] = 'bgzip'; // hack, no real client
# Do remaining chunk
}
$_SERVER['HTTP_ACCEPT_ENCODING'] = 'bgzip'; // hack, no real client
# Do remaining chunk
- $end += $
this->mB
atchSize - 1;
+ $end += $
b
atchSize - 1;
$blockStart = $start;
$blockStart = $start;
- $blockEnd = $start + $
this->mB
atchSize - 1;
+ $blockEnd = $start + $
b
atchSize - 1;
$dbw = $this->getDB( DB_MASTER );
// Go through each page and save the output
$dbw = $this->getDB( DB_MASTER );
// Go through each page and save the output
@@
-171,8
+172,8
@@
class RebuildFileCache extends Maintenance {
}
$this->commitTransaction( $dbw, __METHOD__ ); // commit any changes (just for sanity)
}
$this->commitTransaction( $dbw, __METHOD__ ); // commit any changes (just for sanity)
- $blockStart += $
this->mB
atchSize;
- $blockEnd += $
this->mB
atchSize;
+ $blockStart += $
b
atchSize;
+ $blockEnd += $
b
atchSize;
}
$this->output( "Done!\n" );
}
}
$this->output( "Done!\n" );
}