X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2FcleanupAncientTables.php;h=2dbf8bc1bb6c4672643434a2c6c53949ca3a73dc;hb=4f7d15021d77f0bb4846fc405540a98a12742223;hp=87f14d01a9f0516c65781cc50dca75ccb5f44b16;hpb=8d6c1cd8feb93b2598c403e67b97f8f5f4138f48;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/cleanupAncientTables.php b/maintenance/cleanupAncientTables.php index 87f14d01a9..2dbf8bc1bb 100644 --- a/maintenance/cleanupAncientTables.php +++ b/maintenance/cleanupAncientTables.php @@ -21,7 +21,7 @@ * @ingroup Maintenance */ -require_once( __DIR__ . '/Maintenance.php' ); +require_once __DIR__ . '/Maintenance.php'; /** * Maintenance script to cleans up old database tables, dropping old indexes @@ -40,8 +40,9 @@ class CleanupAncientTables extends Maintenance { public function execute() { if ( !$this->hasOption( 'force' ) ) { $this->error( "This maintenance script will remove old columns and indexes.\n" - . "It is recommended to backup your database first, and ensure all your data has been migrated to newer tables\n" - . "If you want to continue, run this script again with the --force \n" + . "It is recommended to backup your database first, and ensure all your data has\n" + . "been migrated to newer tables. If you want to continue, run this script again\n" + . "with --force.\n" ); } @@ -82,7 +83,7 @@ class CleanupAncientTables extends Maintenance { if ( $db->indexExists( 'text', $index, __METHOD__ ) ) { $this->output( "Dropping index $index from the text table..." ); $db->query( "DROP INDEX " . $db->addIdentifierQuotes( $index ) - . " ON " . $db->tableName( 'text' ) ); + . " ON " . $db->tableName( 'text' ) ); $this->output( "done.\n" ); } } @@ -101,7 +102,7 @@ class CleanupAncientTables extends Maintenance { if ( $db->fieldExists( 'text', $field, __METHOD__ ) ) { $this->output( "Dropping the $field field from the text table..." ); $db->query( "ALTER TABLE " . $db->tableName( 'text' ) - . " DROP COLUMN " . $db->addIdentifierQuotes( $field ) ); + . " DROP COLUMN " . $db->addIdentifierQuotes( $field ) ); $this->output( "done.\n" ); } } @@ -110,4 +111,4 @@ class CleanupAncientTables extends Maintenance { } $maintClass = "CleanupAncientTables"; -require_once( RUN_MAINTENANCE_IF_MAIN ); +require_once RUN_MAINTENANCE_IF_MAIN;