BUGFIX Database password input in installer should be password, so that the password is obfuscated when input

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@108432 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Sean Harvey 2010-07-24 00:07:59 +00:00 committed by Sam Minnee
parent c52529215f
commit 1b52224622

View File

@ -129,7 +129,8 @@
echo '<div class="dbfields">'; echo '<div class="dbfields">';
if(isset($details['fields'])) foreach($details['fields'] as $fieldName => $fieldSpec) { if(isset($details['fields'])) foreach($details['fields'] as $fieldName => $fieldSpec) {
$fieldTitle = $fieldSpec['title']; $fieldTitle = $fieldSpec['title'];
$fieldType = ($fieldName == 'password') ? 'password' : 'text';
// values // values
$defaultValue = (isset($fieldSpec['default'])) ? $fieldSpec['default'] : null; $defaultValue = (isset($fieldSpec['default'])) ? $fieldSpec['default'] : null;
if($usingEnv && isset($fieldSpec['envVar']) && defined($fieldSpec['envVar'])) { if($usingEnv && isset($fieldSpec['envVar']) && defined($fieldSpec['envVar'])) {
@ -142,7 +143,7 @@
$attrs = array( $attrs = array(
'id' => "db_{$class}_{$fieldName}", 'id' => "db_{$class}_{$fieldName}",
'class' => 'text', 'class' => 'text',
'type' => 'text', 'type' => $fieldType,
'name' => "db[$class][$fieldName]", 'name' => "db[$class][$fieldName]",
'value' => $value, 'value' => $value,
); );