ding2tal/ddbasic — pull request #15 by xendk (2014-12-19 11:17:06+00:00)
Title: Propagate fieldgroup weights to template wrappers.

When moving the fieldgroups into wrappers in ddbasic_preprocess_ting_object(), the #weights gets lost. The upshoot of this is that if any field is added outside a fieldgroup, or any other child with a #weight gets added, the order of the groups will be jumbled.

The underlying reason is that element_children will preserve the order of children if none have a weight set, but if any have a weight, uasort() will be used, which doesn't make any guarantees on the order of items which is considered equal, and all the group wrappers will get a default #weight of zero.

Copying the group weight not only fixes this, but allows one to make minor ordering adjustments in the backend again.