X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2FrebuildLocalisationCache.php;h=68b6ea311da0ff357db1ef2b9b021c255a075b4a;hb=996b7350f3355f24abb55394ced108c0c9b8ef3a;hp=47866dc047b3c87f0123b644c376f34b6b46261f;hpb=53a43bb6516ceeecf7b6712169e6b2f8c4ce0fb9;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/rebuildLocalisationCache.php b/maintenance/rebuildLocalisationCache.php index 47866dc047..68b6ea311d 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)', @@ -48,14 +48,6 @@ class RebuildLocalisationCache extends Maintenance { false, true ); } - public function memoryLimit() { - if ( $this->hasOption( 'memory-limit' ) ) { - return parent::memoryLimit(); - } - - return '1000M'; - } - public function finalSetup() { # This script needs to be run to build the inital l10n cache. But if # $wgLanguageCode is not 'en', it won't be able to run because there is @@ -112,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