Add option to override storeClass in rebuildLocalisationCache
This is useful when migrating between several LC stores and you need to rebuild them in several stores. Bug: T105683 Bug: T99740 Change-Id: I64ef1812ea0605f9b3ed037459c6510a5ebe3dec
This commit is contained in:
parent
0c639e86ba
commit
1bea7c5c44
1 changed files with 10 additions and 0 deletions
|
|
@ -50,6 +50,12 @@ class RebuildLocalisationCache extends Maintenance {
|
|||
false, true );
|
||||
$this->addOption( 'lang', 'Only rebuild these languages, comma separated.',
|
||||
false, true );
|
||||
$this->addOption(
|
||||
'store-class',
|
||||
'Override the LC store class (normally $wgLocalisationCacheConf[\'storeClass\'])',
|
||||
false,
|
||||
true
|
||||
);
|
||||
}
|
||||
|
||||
public function finalSetup() {
|
||||
|
|
@ -85,6 +91,10 @@ class RebuildLocalisationCache extends Maintenance {
|
|||
if ( $this->hasOption( 'outdir' ) ) {
|
||||
$conf['storeDirectory'] = $this->getOption( 'outdir' );
|
||||
}
|
||||
|
||||
if ( $this->hasOption( 'store-class' ) ) {
|
||||
$conf['storeClass'] = $this->getOption( 'store-class' );
|
||||
}
|
||||
// XXX Copy-pasted from ServiceWiring.php. Do we need a factory for this one caller?
|
||||
$lc = new LocalisationCacheBulkLoad(
|
||||
new ServiceOptions(
|
||||
|
|
|
|||
Loading…
Reference in a new issue