Index: trunk/phase3/includes/installer/Installer.i18n.php |
— | — | @@ -234,9 +234,9 @@ |
235 | 235 | 'config-invalid-db-server-oracle' => 'Invalid database TNS "$1". |
236 | 236 | Use only ASCII letters (a-z, A-Z), numbers (0-9), underscores (_) and dots (.).', |
237 | 237 | 'config-invalid-db-name' => 'Invalid database name "$1". |
238 | | -Use only ASCII letters (a-z, A-Z), numbers (0-9) and underscores (_).', |
| 238 | +Use only ASCII letters (a-z, A-Z), numbers (0-9), underscores (_) and hyphens (-).', |
239 | 239 | 'config-invalid-db-prefix' => 'Invalid database prefix "$1". |
240 | | -Use only ASCII letters (a-z, A-Z), numbers (0-9) and underscores (_).', |
| 240 | +Use only ASCII letters (a-z, A-Z), numbers (0-9), underscores (_) and hyphens (-).', |
241 | 241 | 'config-connection-error' => '$1. |
242 | 242 | |
243 | 243 | Check the host, username and password below and try again.', |
Index: trunk/phase3/includes/installer/MysqlInstaller.php |
— | — | @@ -76,10 +76,10 @@ |
77 | 77 | $status = Status::newGood(); |
78 | 78 | if ( !strlen( $newValues['wgDBname'] ) ) { |
79 | 79 | $status->fatal( 'config-missing-db-name' ); |
80 | | - } elseif ( !preg_match( '/^[a-zA-Z0-9_]+$/', $newValues['wgDBname'] ) ) { |
| 80 | + } elseif ( !preg_match( '/^[a-z0-9_-]+$/i', $newValues['wgDBname'] ) ) { |
81 | 81 | $status->fatal( 'config-invalid-db-name', $newValues['wgDBname'] ); |
82 | 82 | } |
83 | | - if ( !preg_match( '/^[a-zA-Z0-9_]*$/', $newValues['wgDBprefix'] ) ) { |
| 83 | + if ( !preg_match( '/^[a-z0-9_-]*$/i', $newValues['wgDBprefix'] ) ) { |
84 | 84 | $status->fatal( 'config-invalid-db-prefix', $newValues['wgDBprefix'] ); |
85 | 85 | } |
86 | 86 | if ( !$status->isOK() ) { |