* @ingroup Maintenance
*/
-require_once( __DIR__ . '/Maintenance.php' );
+require_once __DIR__ . '/Maintenance.php';
/**
* Maintenance script that changes the prefix of database tables.
}
if ( $old === false || $new === false ) {
- $this->error( "Invalid prefix!", true );
+ $this->fatalError( "Invalid prefix!" );
}
if ( $old === $new ) {
$this->output( "Same prefix. Nothing to rename!\n", true );
$this->output( "Renaming DB prefix for tables of $wgDBname from '$old' to '$new'\n" );
$count = 0;
- $dbw = wfGetDB( DB_MASTER );
+ $dbw = $this->getDB( DB_MASTER );
$res = $dbw->query( "SHOW TABLES " . $dbw->buildLike( $old, $dbw->anyString() ) );
foreach ( $res as $row ) {
// XXX: odd syntax. MySQL outputs an oddly cased "Tables of X"