MediaWiki
REL1_20
|
Maintenance script to rebuild the localisation cache. More...
Public Member Functions | |
__construct () | |
Default constructor. | |
execute () | |
Do the actual work. | |
memoryLimit () | |
Normally we disable the memory_limit when running admin scripts. | |
setForce ($forced=true) | |
Sets whether a run of this maintenance script has the force parameter set. | |
Private Member Functions | |
doRebuild ($codes, $lc, $force) | |
Helper function to rebuild list of languages codes. |
Maintenance script to rebuild the localisation cache.
Definition at line 39 of file rebuildLocalisationCache.php.
Default constructor.
Children should call this *first* if implementing their own constructors
Reimplemented from Maintenance.
Definition at line 40 of file rebuildLocalisationCache.php.
References Maintenance\addOption().
RebuildLocalisationCache::doRebuild | ( | $ | codes, |
$ | lc, | ||
$ | force | ||
) | [private] |
Helper function to rebuild list of languages codes.
Prints the code for each language which is rebuilt.
$codes | array List of language codes to rebuild. |
$lc | LocalisationCache Instance of LocalisationCache_BulkLoad (?) |
$force | bool Rebuild up-to-date languages |
Definition at line 133 of file rebuildLocalisationCache.php.
References Maintenance\output().
Referenced by execute().
Do the actual work.
All child classes will need to implement this
Reimplemented from Maintenance.
Definition at line 56 of file rebuildLocalisationCache.php.
References $total, doRebuild(), Language\fetchLanguageNames(), Maintenance\getOption(), Maintenance\hasOption(), Maintenance\output(), and wfIsWindows().
Normally we disable the memory_limit when running admin scripts.
Some scripts may wish to actually set a limit, however, to avoid blowing up unexpectedly. We also support a --memory-limit option, to allow sysadmins to explicitly set one if they'd prefer to override defaults (or for people using Suhosin which yells at you for trying to disable the limits)
Reimplemented from Maintenance.
Definition at line 49 of file rebuildLocalisationCache.php.
References Maintenance\hasOption().
RebuildLocalisationCache::setForce | ( | $ | forced = true | ) |
Sets whether a run of this maintenance script has the force parameter set.
bool | $forced |
Definition at line 150 of file rebuildLocalisationCache.php.