includes/installer/MssqlInstaller.php 1 location
|
@@ 152-156 (lines=5) @@
|
| 149 |
|
if ( !strlen( $newValues['wgDBserver'] ) ) { |
| 150 |
|
$status->fatal( 'config-missing-db-host' ); |
| 151 |
|
} |
| 152 |
|
if ( !strlen( $newValues['wgDBname'] ) ) { |
| 153 |
|
$status->fatal( 'config-missing-db-name' ); |
| 154 |
|
} elseif ( !preg_match( '/^[a-z0-9_]+$/i', $newValues['wgDBname'] ) ) { |
| 155 |
|
$status->fatal( 'config-invalid-db-name', $newValues['wgDBname'] ); |
| 156 |
|
} |
| 157 |
|
if ( !preg_match( '/^[a-z0-9_]*$/i', $newValues['wgDBmwschema'] ) ) { |
| 158 |
|
$status->fatal( 'config-invalid-schema', $newValues['wgDBmwschema'] ); |
| 159 |
|
} |
includes/installer/MysqlInstaller.php 1 location
|
@@ 103-107 (lines=5) @@
|
| 100 |
|
if ( !strlen( $newValues['wgDBserver'] ) ) { |
| 101 |
|
$status->fatal( 'config-missing-db-host' ); |
| 102 |
|
} |
| 103 |
|
if ( !strlen( $newValues['wgDBname'] ) ) { |
| 104 |
|
$status->fatal( 'config-missing-db-name' ); |
| 105 |
|
} elseif ( !preg_match( '/^[a-z0-9+_-]+$/i', $newValues['wgDBname'] ) ) { |
| 106 |
|
$status->fatal( 'config-invalid-db-name', $newValues['wgDBname'] ); |
| 107 |
|
} |
| 108 |
|
if ( !preg_match( '/^[a-z0-9_-]*$/i', $newValues['wgDBprefix'] ) ) { |
| 109 |
|
$status->fatal( 'config-invalid-db-prefix', $newValues['wgDBprefix'] ); |
| 110 |
|
} |
includes/installer/PostgresInstaller.php 1 location
|
@@ 95-99 (lines=5) @@
|
| 92 |
|
|
| 93 |
|
// Validate them |
| 94 |
|
$status = Status::newGood(); |
| 95 |
|
if ( !strlen( $newValues['wgDBname'] ) ) { |
| 96 |
|
$status->fatal( 'config-missing-db-name' ); |
| 97 |
|
} elseif ( !preg_match( '/^[a-zA-Z0-9_]+$/', $newValues['wgDBname'] ) ) { |
| 98 |
|
$status->fatal( 'config-invalid-db-name', $newValues['wgDBname'] ); |
| 99 |
|
} |
| 100 |
|
if ( !preg_match( '/^[a-zA-Z0-9_]*$/', $newValues['wgDBmwschema'] ) ) { |
| 101 |
|
$status->fatal( 'config-invalid-schema', $newValues['wgDBmwschema'] ); |
| 102 |
|
} |