'config-invalid-db-server-oracle' => 'Invalid database TNS "$1".
Use only ASCII letters (a-z, A-Z), numbers (0-9), underscores (_) and dots (.).',
'config-invalid-db-name' => 'Invalid database name "$1".
-Use only ASCII letters (a-z, A-Z), numbers (0-9) and underscores (_).',
+Use only ASCII letters (a-z, A-Z), numbers (0-9), underscores (_) and hyphens (-).',
'config-invalid-db-prefix' => 'Invalid database prefix "$1".
-Use only ASCII letters (a-z, A-Z), numbers (0-9) and underscores (_).',
+Use only ASCII letters (a-z, A-Z), numbers (0-9), underscores (_) and hyphens (-).',
'config-connection-error' => '$1.
Check the host, username and password below and try again.',
$status = Status::newGood();
if ( !strlen( $newValues['wgDBname'] ) ) {
$status->fatal( 'config-missing-db-name' );
- } elseif ( !preg_match( '/^[a-zA-Z0-9_]+$/', $newValues['wgDBname'] ) ) {
+ } elseif ( !preg_match( '/^[a-z0-9_-]+$/i', $newValues['wgDBname'] ) ) {
$status->fatal( 'config-invalid-db-name', $newValues['wgDBname'] );
}
- if ( !preg_match( '/^[a-zA-Z0-9_]*$/', $newValues['wgDBprefix'] ) ) {
+ if ( !preg_match( '/^[a-z0-9_-]*$/i', $newValues['wgDBprefix'] ) ) {
$status->fatal( 'config-invalid-db-prefix', $newValues['wgDBprefix'] );
}
if ( !$status->isOK() ) {