зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
6e3cff3838
Коммит
1454dc7651
|
@ -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 {
|
||||
|
|
Загрузка…
Ссылка в новой задаче