| 5 install.php | install_verify_settings() |
| 6 install.php | install_verify_settings() |
| 7 install.core.inc | install_verify_settings() |
| 8 install.core.inc | install_verify_settings() |
Verify existing settings.php
1 call to install_verify_settings()
File
- ./
install.php, line 113
Code
function install_verify_settings() {
global $db_prefix, $db_type, $db_url;
// Verify existing settings (if any).
if ($_SERVER['REQUEST_METHOD'] == 'GET' && $db_url != 'mysql://username:password@localhost/databasename') {
// We need this because we want to run form_get_errors.
include_once './includes/form.inc';
$url = parse_url(is_array($db_url) ? $db_url['default'] : $db_url);
$db_user = urldecode($url['user']);
$db_pass = urldecode($url['pass']);
$db_host = urldecode($url['host']);
$db_port = isset($url['port']) ? urldecode($url['port']) : '';
$db_path = ltrim(urldecode($url['path']), '/');
$settings_file = './' . conf_path() . '/settings.php';
_install_settings_form_validate($db_prefix, $db_type, $db_user, $db_pass, $db_host, $db_port, $db_path, $settings_file);
if (!form_get_errors()) {
return TRUE;
}
}
return FALSE;
}
Login or register to post comments