X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2FrebuildLocalisationCache.php;h=b9c797d1075f341fdb630f8cc588b193b16de4b4;hb=5b6883f63ac2155f2434233b8a7eddbe8f67afb4;hp=f89877eabbc0174cfd317b81f50c333fcf9ee028;hpb=6b1a173f07f1a04188735f4688ce6335da14c3b7;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/rebuildLocalisationCache.php b/maintenance/rebuildLocalisationCache.php index f89877eabb..b9c797d107 100644 --- a/maintenance/rebuildLocalisationCache.php +++ b/maintenance/rebuildLocalisationCache.php @@ -39,7 +39,7 @@ require_once __DIR__ . '/Maintenance.php'; class RebuildLocalisationCache extends Maintenance { public function __construct() { parent::__construct(); - $this->mDescription = "Rebuild the localisation cache"; + $this->addDescription( 'Rebuild the localisation cache' ); $this->addOption( 'force', 'Rebuild all files, even ones not out of date' ); $this->addOption( 'threads', 'Fork more than one thread', false, true ); $this->addOption( 'outdir', 'Override the output directory (normally $wgCacheDirectory)', @@ -104,7 +104,7 @@ class RebuildLocalisationCache extends Maintenance { $numRebuilt = 0; $total = count( $codes ); $chunks = array_chunk( $codes, ceil( count( $codes ) / $threads ) ); - $pids = array(); + $pids = []; $parentStatus = 0; foreach ( $chunks as $codes ) { // Do not fork for only one thread @@ -114,6 +114,7 @@ class RebuildLocalisationCache extends Maintenance { // Child, reseed because there is no bug in PHP: // http://bugs.php.net/bug.php?id=42465 mt_srand( getmypid() ); + $this->doRebuild( $codes, $lc, $force ); exit( 0 ); } elseif ( $pid === -1 ) {