3 * DBMS-specific updater helper.
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License along
16 * with this program; if not, write to the Free Software Foundation, Inc.,
17 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18 * http://www.gnu.org/copyleft/gpl.html
24 require_once( __DIR__
. '/../../maintenance/Maintenance.php' );
27 * Class for handling database updates. Roughly based off of updaters.inc, with
28 * a few improvements :)
33 abstract class DatabaseUpdater
{
36 * Array of updates to perform on the database
40 protected $updates = array();
43 * Array of updates that were skipped
47 protected $updatesSkipped = array();
50 * List of extension-provided database updates
53 protected $extensionUpdates = array();
56 * Handle to the database subclass
62 protected $shared = false;
65 * Scripts to run after database update
66 * Should be a subclass of LoggedUpdateMaintenance
68 protected $postDatabaseUpdateMaintenance = array(
69 'DeleteDefaultMessages',
70 'PopulateRevisionLength',
71 'PopulateRevisionSha1',
73 'FixExtLinksProtocolRelative',
74 'PopulateFilearchiveSha1',
78 * File handle for SQL output.
82 protected $fileHandle = null;
85 * Flag specifying whether or not to skip schema (e.g. SQL-only) updates.
89 protected $skipSchema = false;
94 * @param $db DatabaseBase object to perform updates on
95 * @param $shared bool Whether to perform updates on shared tables
96 * @param $maintenance Maintenance Maintenance object which created us
98 protected function __construct( DatabaseBase
&$db, $shared, Maintenance
$maintenance = null ) {
100 $this->db
->setFlag( DBO_DDLMODE
); // For Oracle's handling of schema files
101 $this->shared
= $shared;
102 if ( $maintenance ) {
103 $this->maintenance
= $maintenance;
104 $this->fileHandle
= $maintenance->fileHandle
;
106 $this->maintenance
= new FakeMaintenance
;
108 $this->maintenance
->setDB( $db );
109 $this->initOldGlobals();
110 $this->loadExtensions();
111 wfRunHooks( 'LoadExtensionSchemaUpdates', array( $this ) );
115 * Initialize all of the old globals. One day this should all become
116 * something much nicer
118 private function initOldGlobals() {
119 global $wgExtNewTables, $wgExtNewFields, $wgExtPGNewFields,
120 $wgExtPGAlteredFields, $wgExtNewIndexes, $wgExtModifiedFields;
122 # For extensions only, should be populated via hooks
123 # $wgDBtype should be checked to specifiy the proper file
124 $wgExtNewTables = array(); // table, dir
125 $wgExtNewFields = array(); // table, column, dir
126 $wgExtPGNewFields = array(); // table, column, column attributes; for PostgreSQL
127 $wgExtPGAlteredFields = array(); // table, column, new type, conversion method; for PostgreSQL
128 $wgExtNewIndexes = array(); // table, index, dir
129 $wgExtModifiedFields = array(); // table, index, dir
133 * Loads LocalSettings.php, if needed, and initialises everything needed for LoadExtensionSchemaUpdates hook
135 private function loadExtensions() {
136 if ( !defined( 'MEDIAWIKI_INSTALL' ) ) {
137 return; // already loaded
139 $vars = Installer
::getExistingLocalSettings();
141 return; // no LocalSettings found
143 if ( !isset( $vars['wgHooks'] ) ||
!isset( $vars['wgHooks']['LoadExtensionSchemaUpdates'] ) ) {
146 global $wgHooks, $wgAutoloadClasses;
147 $wgHooks['LoadExtensionSchemaUpdates'] = $vars['wgHooks']['LoadExtensionSchemaUpdates'];
148 $wgAutoloadClasses = $wgAutoloadClasses +
$vars['wgAutoloadClasses'];
152 * @throws MWException
153 * @param DatabaseBase $db
154 * @param bool $shared
155 * @param null $maintenance
156 * @return DatabaseUpdater
158 public static function newForDB( &$db, $shared = false, $maintenance = null ) {
159 $type = $db->getType();
160 if( in_array( $type, Installer
::getDBTypes() ) ) {
161 $class = ucfirst( $type ) . 'Updater';
162 return new $class( $db, $shared, $maintenance );
164 throw new MWException( __METHOD__
. ' called for unsupported $wgDBtype' );
169 * Get a database connection to run updates
171 * @return DatabaseBase
173 public function getDB() {
178 * Output some text. If we're running from web, escape the text first.
180 * @param $str String: Text to output
182 public function output( $str ) {
183 if ( $this->maintenance
->isQuiet() ) {
186 global $wgCommandLineMode;
187 if( !$wgCommandLineMode ) {
188 $str = htmlspecialchars( $str );
195 * Add a new update coming from an extension. This should be called by
196 * extensions while executing the LoadExtensionSchemaUpdates hook.
200 * @param $update Array: the update to run. Format is the following:
201 * first item is the callback function, it also can be a
202 * simple string with the name of a function in this class,
203 * following elements are parameters to the function.
204 * Note that callback functions will receive this object as
207 public function addExtensionUpdate( array $update ) {
208 $this->extensionUpdates
[] = $update;
212 * Convenience wrapper for addExtensionUpdate() when adding a new table (which
213 * is the most common usage of updaters in an extension)
217 * @param $tableName String Name of table to create
218 * @param $sqlPath String Full path to the schema file
220 public function addExtensionTable( $tableName, $sqlPath ) {
221 $this->extensionUpdates
[] = array( 'addTable', $tableName, $sqlPath, true );
227 * @param $tableName string
228 * @param $indexName string
229 * @param $sqlPath string
231 public function addExtensionIndex( $tableName, $indexName, $sqlPath ) {
232 $this->extensionUpdates
[] = array( 'addIndex', $tableName, $indexName, $sqlPath, true );
239 * @param $tableName string
240 * @param $columnName string
241 * @param $sqlPath string
243 public function addExtensionField( $tableName, $columnName, $sqlPath ) {
244 $this->extensionUpdates
[] = array( 'addField', $tableName, $columnName, $sqlPath, true );
251 * @param $tableName string
252 * @param $columnName string
253 * @param $sqlPath string
255 public function dropExtensionField( $tableName, $columnName, $sqlPath ) {
256 $this->extensionUpdates
[] = array( 'dropField', $tableName, $columnName, $sqlPath, true );
263 * @param $tableName string
264 * @param $sqlPath string
266 public function dropExtensionTable( $tableName, $sqlPath ) {
267 $this->extensionUpdates
[] = array( 'dropTable', $tableName, $sqlPath, true );
274 * @param $tableName string
277 public function tableExists( $tableName ) {
278 return ( $this->db
->tableExists( $tableName, __METHOD__
) );
282 * Add a maintenance script to be run after the database updates are complete.
284 * Script should subclass LoggedUpdateMaintenance
288 * @param $class string Name of a Maintenance subclass
290 public function addPostDatabaseUpdateMaintenance( $class ) {
291 $this->postDatabaseUpdateMaintenance
[] = $class;
295 * Get the list of extension-defined updates
299 protected function getExtensionUpdates() {
300 return $this->extensionUpdates
;
308 public function getPostDatabaseUpdateMaintenance() {
309 return $this->postDatabaseUpdateMaintenance
;
315 * Writes the schema updates desired to a file for the DB Admin to run.
317 private function writeSchemaUpdateFile( $schemaUpdate = array() ) {
318 $updates = $this->updatesSkipped
;
319 $this->updatesSkipped
= array();
321 foreach( $updates as $funcList ) {
322 $func = $funcList[0];
324 $origParams = $funcList[2];
325 $ret = call_user_func_array( $func, $arg );
327 $this->updatesSkipped
[] = $origParams;
334 * @param $what Array: what updates to perform
336 public function doUpdates( $what = array( 'core', 'extensions', 'stats' ) ) {
337 global $wgVersion, $wgLocalisationCacheConf;
339 $this->db
->begin( __METHOD__
);
340 $what = array_flip( $what );
341 $this->skipSchema
= isset( $what['noschema'] ) ||
$this->fileHandle
!== null;
342 if ( isset( $what['core'] ) ) {
343 $this->runUpdates( $this->getCoreUpdateList(), false );
345 if ( isset( $what['extensions'] ) ) {
346 $this->runUpdates( $this->getOldGlobalUpdates(), false );
347 $this->runUpdates( $this->getExtensionUpdates(), true );
350 if ( isset( $what['stats'] ) ) {
354 if ( isset( $what['purge'] ) ) {
357 if ( $wgLocalisationCacheConf['manualRecache'] ) {
358 $this->rebuildLocalisationCache();
362 $this->setAppliedUpdates( $wgVersion, $this->updates
);
364 if( $this->fileHandle
) {
365 $this->skipSchema
= false;
366 $this->writeSchemaUpdateFile( );
367 $this->setAppliedUpdates( "$wgVersion-schema", $this->updatesSkipped
);
370 $this->db
->commit( __METHOD__
);
374 * Helper function for doUpdates()
376 * @param $updates Array of updates to run
377 * @param $passSelf Boolean: whether to pass this object we calling external
380 private function runUpdates( array $updates, $passSelf ) {
381 $updatesDone = array();
382 $updatesSkipped = array();
383 foreach ( $updates as $params ) {
384 $origParams = $params;
385 $func = array_shift( $params );
386 if( !is_array( $func ) && method_exists( $this, $func ) ) {
387 $func = array( $this, $func );
388 } elseif ( $passSelf ) {
389 array_unshift( $params, $this );
391 $ret = call_user_func_array( $func, $params );
393 if( $ret !== false ) {
394 $updatesDone[] = $origParams;
396 $updatesSkipped[] = array( $func, $params, $origParams );
399 $this->updatesSkipped
= array_merge( $this->updatesSkipped
, $updatesSkipped );
400 $this->updates
= array_merge( $this->updates
, $updatesDone );
405 * @param $updates array
407 protected function setAppliedUpdates( $version, $updates = array() ) {
408 $this->db
->clearFlag( DBO_DDLMODE
);
409 if( !$this->canUseNewUpdatelog() ) {
412 $key = "updatelist-$version-" . time();
413 $this->db
->insert( 'updatelog',
414 array( 'ul_key' => $key, 'ul_value' => serialize( $updates ) ),
416 $this->db
->setFlag( DBO_DDLMODE
);
420 * Helper function: check if the given key is present in the updatelog table.
421 * Obviously, only use this for updates that occur after the updatelog table was
423 * @param $key String Name of the key to check for
427 public function updateRowExists( $key ) {
428 $row = $this->db
->selectRow(
431 array( 'ul_key' => $key ),
438 * Helper function: Add a key to the updatelog table
439 * Obviously, only use this for updates that occur after the updatelog table was
441 * @param $key String Name of key to insert
442 * @param $val String [optional] value to insert along with the key
444 public function insertUpdateRow( $key, $val = null ) {
445 $this->db
->clearFlag( DBO_DDLMODE
);
446 $values = array( 'ul_key' => $key );
447 if( $val && $this->canUseNewUpdatelog() ) {
448 $values['ul_value'] = $val;
450 $this->db
->insert( 'updatelog', $values, __METHOD__
, 'IGNORE' );
451 $this->db
->setFlag( DBO_DDLMODE
);
455 * Updatelog was changed in 1.17 to have a ul_value column so we can record
456 * more information about what kind of updates we've done (that's what this
457 * class does). Pre-1.17 wikis won't have this column, and really old wikis
458 * might not even have updatelog at all
462 protected function canUseNewUpdatelog() {
463 return $this->db
->tableExists( 'updatelog', __METHOD__
) &&
464 $this->db
->fieldExists( 'updatelog', 'ul_value', __METHOD__
);
468 * Returns whether updates should be executed on the database table $name.
469 * Updates will be prevented if the table is a shared table and it is not
470 * specified to run updates on shared tables.
472 * @param $name String table name
475 protected function doTable( $name ) {
476 global $wgSharedDB, $wgSharedTables;
478 // Don't bother to check $wgSharedTables if there isn't a shared database
479 // or the user actually also wants to do updates on the shared database.
480 if ( $wgSharedDB === null ||
$this->shared
) {
484 return !in_array( $name, $wgSharedTables );
488 * Before 1.17, we used to handle updates via stuff like
489 * $wgExtNewTables/Fields/Indexes. This is nasty :) We refactored a lot
490 * of this in 1.17 but we want to remain back-compatible for a while. So
491 * load up these old global-based things into our update list.
495 protected function getOldGlobalUpdates() {
496 global $wgExtNewFields, $wgExtNewTables, $wgExtModifiedFields,
501 foreach ( $wgExtNewTables as $tableRecord ) {
503 'addTable', $tableRecord[0], $tableRecord[1], true
507 foreach ( $wgExtNewFields as $fieldRecord ) {
509 'addField', $fieldRecord[0], $fieldRecord[1],
510 $fieldRecord[2], true
514 foreach ( $wgExtNewIndexes as $fieldRecord ) {
516 'addIndex', $fieldRecord[0], $fieldRecord[1],
517 $fieldRecord[2], true
521 foreach ( $wgExtModifiedFields as $fieldRecord ) {
523 'modifyField', $fieldRecord[0], $fieldRecord[1],
524 $fieldRecord[2], true
532 * Get an array of updates to perform on the database. Should return a
533 * multi-dimensional array. The main key is the MediaWiki version (1.12,
534 * 1.13...) with the values being arrays of updates, identical to how
535 * updaters.inc did it (for now)
539 protected abstract function getCoreUpdateList();
542 * Append an SQL fragment to the open file handle.
544 * @param $filename String: File name to open
546 public function copyFile( $filename ) {
547 $this->db
->sourceFile( $filename, false, false, false,
548 array( $this, 'appendLine' )
553 * Append a line to the open filehandle. The line is assumed to
554 * be a complete SQL statement.
556 * This is used as a callback for for sourceLine().
558 * @param $line String text to append to the file
559 * @return Boolean false to skip actually executing the file
560 * @throws MWException
562 public function appendLine( $line ) {
563 $line = rtrim( $line ) . ";\n";
564 if( fwrite( $this->fileHandle
, $line ) === false ) {
565 throw new MWException( "trouble writing file" );
571 * Applies a SQL patch
572 * @param $path String Path to the patch file
573 * @param $isFullPath Boolean Whether to treat $path as a relative or not
574 * @param $msg String Description of the patch
575 * @return boolean false if patch is skipped.
577 protected function applyPatch( $path, $isFullPath = false, $msg = null ) {
578 if ( $msg === null ) {
579 $msg = "Applying $path patch";
581 if ( $this->skipSchema
) {
582 $this->output( "...skipping schema change ($msg).\n" );
586 $this->output( "$msg ..." );
588 if ( !$isFullPath ) {
589 $path = $this->db
->patchPath( $path );
591 if( $this->fileHandle
!== null ) {
592 $this->copyFile( $path );
594 $this->db
->sourceFile( $path );
596 $this->output( "done.\n" );
601 * Add a new table to the database
602 * @param $name String Name of the new table
603 * @param $patch String Path to the patch file
604 * @param $fullpath Boolean Whether to treat $patch path as a relative or not
605 * @return Boolean false if this was skipped because schema changes are skipped
607 protected function addTable( $name, $patch, $fullpath = false ) {
608 if ( !$this->doTable( $name ) ) {
612 if ( $this->db
->tableExists( $name, __METHOD__
) ) {
613 $this->output( "...$name table already exists.\n" );
615 return $this->applyPatch( $patch, $fullpath, "Creating $name table" );
621 * Add a new field to an existing table
622 * @param $table String Name of the table to modify
623 * @param $field String Name of the new field
624 * @param $patch String Path to the patch file
625 * @param $fullpath Boolean Whether to treat $patch path as a relative or not
626 * @return Boolean false if this was skipped because schema changes are skipped
628 protected function addField( $table, $field, $patch, $fullpath = false ) {
629 if ( !$this->doTable( $table ) ) {
633 if ( !$this->db
->tableExists( $table, __METHOD__
) ) {
634 $this->output( "...$table table does not exist, skipping new field patch.\n" );
635 } elseif ( $this->db
->fieldExists( $table, $field, __METHOD__
) ) {
636 $this->output( "...have $field field in $table table.\n" );
638 return $this->applyPatch( $patch, $fullpath, "Adding $field field to table $table" );
644 * Add a new index to an existing table
645 * @param $table String Name of the table to modify
646 * @param $index String Name of the new index
647 * @param $patch String Path to the patch file
648 * @param $fullpath Boolean Whether to treat $patch path as a relative or not
649 * @return Boolean false if this was skipped because schema changes are skipped
651 protected function addIndex( $table, $index, $patch, $fullpath = false ) {
652 if ( !$this->doTable( $table ) ) {
656 if ( !$this->db
->tableExists( $table, __METHOD__
) ) {
657 $this->output( "...skipping: '$table' table doesn't exist yet.\n" );
659 } else if ( $this->db
->indexExists( $table, $index, __METHOD__
) ) {
660 $this->output( "...index $index already set on $table table.\n" );
662 return $this->applyPatch( $patch, $fullpath, "Adding index $index to table $table" );
668 * Drop a field from an existing table
670 * @param $table String Name of the table to modify
671 * @param $field String Name of the old field
672 * @param $patch String Path to the patch file
673 * @param $fullpath Boolean Whether to treat $patch path as a relative or not
674 * @return Boolean false if this was skipped because schema changes are skipped
676 protected function dropField( $table, $field, $patch, $fullpath = false ) {
677 if ( !$this->doTable( $table ) ) {
681 if ( $this->db
->fieldExists( $table, $field, __METHOD__
) ) {
682 return $this->applyPatch( $patch, $fullpath, "Table $table contains $field field. Dropping" );
684 $this->output( "...$table table does not contain $field field.\n" );
690 * Drop an index from an existing table
692 * @param $table String: Name of the table to modify
693 * @param $index String: Name of the old index
694 * @param $patch String: Path to the patch file
695 * @param $fullpath Boolean: Whether to treat $patch path as a relative or not
696 * @return Boolean false if this was skipped because schema changes are skipped
698 protected function dropIndex( $table, $index, $patch, $fullpath = false ) {
699 if ( !$this->doTable( $table ) ) {
703 if ( $this->db
->indexExists( $table, $index, __METHOD__
) ) {
704 return $this->applyPatch( $patch, $fullpath, "Dropping $index index from table $table" );
706 $this->output( "...$index key doesn't exist.\n" );
712 * If the specified table exists, drop it, or execute the
713 * patch if one is provided.
717 * @param $table string
718 * @param $patch string|false
719 * @param $fullpath bool
720 * @return Boolean false if this was skipped because schema changes are skipped
722 public function dropTable( $table, $patch = false, $fullpath = false ) {
723 if ( !$this->doTable( $table ) ) {
727 if ( $this->db
->tableExists( $table, __METHOD__
) ) {
728 $msg = "Dropping table $table";
730 if ( $patch === false ) {
731 $this->output( "$msg ..." );
732 $this->db
->dropTable( $table, __METHOD__
);
733 $this->output( "done.\n" );
736 return $this->applyPatch( $patch, $fullpath, $msg );
739 $this->output( "...$table doesn't exist.\n" );
745 * Modify an existing field
747 * @param $table String: name of the table to which the field belongs
748 * @param $field String: name of the field to modify
749 * @param $patch String: path to the patch file
750 * @param $fullpath Boolean: whether to treat $patch path as a relative or not
751 * @return Boolean false if this was skipped because schema changes are skipped
753 public function modifyField( $table, $field, $patch, $fullpath = false ) {
754 if ( !$this->doTable( $table ) ) {
758 $updateKey = "$table-$field-$patch";
759 if ( !$this->db
->tableExists( $table, __METHOD__
) ) {
760 $this->output( "...$table table does not exist, skipping modify field patch.\n" );
761 } elseif ( !$this->db
->fieldExists( $table, $field, __METHOD__
) ) {
762 $this->output( "...$field field does not exist in $table table, skipping modify field patch.\n" );
763 } elseif( $this->updateRowExists( $updateKey ) ) {
764 $this->output( "...$field in table $table already modified by patch $patch.\n" );
766 $this->insertUpdateRow( $updateKey );
767 return $this->applyPatch( $patch, $fullpath, "Modifying $field field of table $table" );
773 * Purge the objectcache table
775 public function purgeCache() {
776 global $wgLocalisationCacheConf;
777 # We can't guarantee that the user will be able to use TRUNCATE,
778 # but we know that DELETE is available to us
779 $this->output( "Purging caches..." );
780 $this->db
->delete( 'objectcache', '*', __METHOD__
);
781 if ( $wgLocalisationCacheConf['manualRecache'] ) {
782 $this->rebuildLocalisationCache();
784 $this->output( "done.\n" );
788 * Check the site_stats table is not properly populated.
790 protected function checkStats() {
791 $this->output( "...site_stats is populated..." );
792 $row = $this->db
->selectRow( 'site_stats', '*', array( 'ss_row_id' => 1 ), __METHOD__
);
793 if ( $row === false ) {
794 $this->output( "data is missing! rebuilding...\n" );
795 } elseif ( isset( $row->site_stats
) && $row->ss_total_pages
== -1 ) {
796 $this->output( "missing ss_total_pages, rebuilding...\n" );
798 $this->output( "done.\n" );
801 SiteStatsInit
::doAllAndCommit( $this->db
);
804 # Common updater functions
807 * Sets the number of active users in the site_stats table
809 protected function doActiveUsersInit() {
810 $activeUsers = $this->db
->selectField( 'site_stats', 'ss_active_users', false, __METHOD__
);
811 if ( $activeUsers == -1 ) {
812 $activeUsers = $this->db
->selectField( 'recentchanges',
813 'COUNT( DISTINCT rc_user_text )',
814 array( 'rc_user != 0', 'rc_bot' => 0, "rc_log_type != 'newusers'" ), __METHOD__
816 $this->db
->update( 'site_stats',
817 array( 'ss_active_users' => intval( $activeUsers ) ),
818 array( 'ss_row_id' => 1 ), __METHOD__
, array( 'LIMIT' => 1 )
821 $this->output( "...ss_active_users user count set...\n" );
825 * Populates the log_user_text field in the logging table
827 protected function doLogUsertextPopulation() {
828 if ( !$this->updateRowExists( 'populate log_usertext' ) ) {
830 "Populating log_user_text field, printing progress markers. For large\n" .
831 "databases, you may want to hit Ctrl-C and do this manually with\n" .
832 "maintenance/populateLogUsertext.php.\n" );
834 $task = $this->maintenance
->runChild( 'PopulateLogUsertext' );
836 $this->output( "done.\n" );
841 * Migrate log params to new table and index for searching
843 protected function doLogSearchPopulation() {
844 if ( !$this->updateRowExists( 'populate log_search' ) ) {
846 "Populating log_search table, printing progress markers. For large\n" .
847 "databases, you may want to hit Ctrl-C and do this manually with\n" .
848 "maintenance/populateLogSearch.php.\n" );
850 $task = $this->maintenance
->runChild( 'PopulateLogSearch' );
852 $this->output( "done.\n" );
857 * Updates the timestamps in the transcache table
859 protected function doUpdateTranscacheField() {
860 if ( $this->updateRowExists( 'convert transcache field' ) ) {
861 $this->output( "...transcache tc_time already converted.\n" );
865 return $this->applyPatch( 'patch-tc-timestamp.sql', false,
866 "Converting tc_time from UNIX epoch to MediaWiki timestamp" );
870 * Update CategoryLinks collation
872 protected function doCollationUpdate() {
873 global $wgCategoryCollation;
874 if ( $this->db
->fieldExists( 'categorylinks', 'cl_collation', __METHOD__
) ) {
875 if ( $this->db
->selectField(
878 'cl_collation != ' . $this->db
->addQuotes( $wgCategoryCollation ),
881 $this->output( "...collations up-to-date.\n" );
885 $this->output( "Updating category collations..." );
886 $task = $this->maintenance
->runChild( 'UpdateCollation' );
888 $this->output( "...done.\n" );
893 * Migrates user options from the user table blob to user_properties
895 protected function doMigrateUserOptions() {
896 if( $this->db
->tableExists( 'user_properties' ) ) {
897 $cl = $this->maintenance
->runChild( 'ConvertUserOptions', 'convertUserOptions.php' );
899 $this->output( "done.\n" );
904 * Rebuilds the localisation cache
906 protected function rebuildLocalisationCache() {
908 * @var $cl RebuildLocalisationCache
910 $cl = $this->maintenance
->runChild( 'RebuildLocalisationCache', 'rebuildLocalisationCache.php' );
911 $this->output( "Rebuilding localisation cache...\n" );
914 $this->output( "done.\n" );