getFieldsHierarchically() will now return an even prettier result. Since it is mainly (currently only?) used for creating the data hash sent to the string expanders, this makes it a lot easier to author the templates. No silly numbers to remember. :-)

This commit is contained in:
ian%hixie.ch 2001-12-04 12:51:48 +00:00
Родитель 6e3cff3838
Коммит 1454dc7651
1 изменённых файлов: 3 добавлений и 3 удалений

Просмотреть файл

@ -156,12 +156,12 @@ sub getFieldsHierarchically {
my $fields = {};
foreach my $field (@{$self->getFields($app)}) {
if (not defined($fields->{$field->[2]})) {
$fields->{$field->[2]} = { $field->[3] => [$field->[0], $field->[1], $field->[4], ] };
$fields->{$field->[2]} = { $field->[3] => { 'type' => $field->[0], 'fieldID' => $field->[1], 'typeData' => $field->[4], } };
} else {
$fields->{$field->[2]}->{$field->[3]} = [$field->[0], $field->[1], $field->[4]];
$fields->{$field->[2]}->{$field->[3]} = { 'type' => $field->[0], 'fieldID' => $field->[1], 'typeData' => $field->[4], };
}
}
return $fields; # { category => { name => [type, fieldID, typeData] } }
return $fields; # { category => { name => { 'type' => '', 'fieldID' => 0, 'typeData' => '', } } }
}
sub getFieldByID {