diff options
author | Dries Buytaert <dries@buytaert.net> | 2009-05-28 08:34:14 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2009-05-28 08:34:14 +0000 |
commit | 2cb8fb68dec002cfa7683307ba956212f6743ed8 (patch) | |
tree | e0d6fd61be20ba8f3b673c8e6bcdf2e5b8ff1992 /install.php | |
parent | 119141276c54bccd18becf8c3dd673e93eb22ddd (diff) | |
download | brdo-2cb8fb68dec002cfa7683307ba956212f6743ed8.tar.gz brdo-2cb8fb68dec002cfa7683307ba956212f6743ed8.tar.bz2 |
- Patch #474156 by brainless: fixed database prefix validation. We need tests for the installer. ;-)
Diffstat (limited to 'install.php')
-rw-r--r-- | install.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/install.php b/install.php index acceede2b..82dcfe9d8 100644 --- a/install.php +++ b/install.php @@ -344,8 +344,8 @@ function install_settings_form_validate($form, &$form_state) { function _install_settings_form_validate($database, $settings_file, &$form_state, $form = NULL) { global $databases; // Verify the table prefix - if (!empty($database['prefix']) && is_string($database['prefix']) && !preg_match('/^[A-Za-z0-9_.]+$/', $database['dprefix'])) { - form_set_error('db_prefix', st('The database table prefix you have entered, %db_prefix, is invalid. The table prefix can only contain alphanumeric characters, periods, or underscores.', array('%db_prefix' => $db_prefix)), 'error'); + if (!empty($database['db_prefix']) && is_string($database['db_prefix']) && !preg_match('/^[A-Za-z0-9_.]+$/', $database['db_prefix'])) { + form_set_error('db_prefix', st('The database table prefix you have entered, %db_prefix, is invalid. The table prefix can only contain alphanumeric characters, periods, or underscores.', array('%db_prefix' => $database['db_prefix'])), 'error'); } if (!empty($database['port']) && !is_numeric($database['port'])) { |