Commit a85b93fe authored by Dries's avatar Dries
Browse files

- Patch #382096 by Arancaytar: improve the form limits so that they actually...

- Patch #382096 by Arancaytar: improve the form limits so that they actually make sense and don't get in the way of SQLite support.
parent 70959486
......@@ -254,7 +254,6 @@ function install_settings_form(&$form_state, $profile, $install_locale, $setting
'#title' => st('Database name'),
'#default_value' => empty($database['database']) ? '' : $database['database'],
'#size' => 45,
'#maxlength' => 45,
'#required' => TRUE,
'#description' => st('The name of the database your @drupal data will be stored in. It must exist on your server before @drupal can be installed.', array('@drupal' => drupal_install_profile_name())),
);
......@@ -265,7 +264,6 @@ function install_settings_form(&$form_state, $profile, $install_locale, $setting
'#title' => st('Database username'),
'#default_value' => empty($database['username']) ? '' : $database['username'],
'#size' => 45,
'#maxlength' => 45,
);
// Database username
......@@ -274,7 +272,6 @@ function install_settings_form(&$form_state, $profile, $install_locale, $setting
'#title' => st('Database password'),
'#default_value' => empty($database['password']) ? '' : $database['password'],
'#size' => 45,
'#maxlength' => 45,
);
$form['advanced_options'] = array(
......@@ -291,7 +288,8 @@ function install_settings_form(&$form_state, $profile, $install_locale, $setting
'#title' => st('Database host'),
'#default_value' => empty($database['host']) ? 'localhost' : $database['host'],
'#size' => 45,
'#maxlength' => 45,
// Hostnames can be 255 characters long.
'#maxlength' => 255,
'#required' => TRUE,
'#description' => st('If your database is located on a different server, change this.'),
);
......@@ -302,7 +300,8 @@ function install_settings_form(&$form_state, $profile, $install_locale, $setting
'#title' => st('Database port'),
'#default_value' => empty($database['port']) ? '' : $database['port'],
'#size' => 45,
'#maxlength' => 45,
// The maximum port number is 65536, 5 digits.
'#maxlength' => 5,
'#description' => st('If your database server is listening to a non-standard port, enter its number.'),
);
......@@ -313,7 +312,6 @@ function install_settings_form(&$form_state, $profile, $install_locale, $setting
'#title' => st('Table prefix'),
'#default_value' => '',
'#size' => 45,
'#maxlength' => 45,
'#description' => st('If more than one application will be sharing this database, enter a table prefix such as %prefix for your @drupal site here.', array('@drupal' => drupal_install_profile_name(), '%prefix' => $db_prefix)),
);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment