diff options
author | Dries Buytaert <dries@buytaert.net> | 2010-01-03 06:54:41 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2010-01-03 06:54:41 +0000 |
commit | c5fea4f88a62b02c7d3c78087815b77fc6efcdb3 (patch) | |
tree | 73251f71b666511e41e0f459cda114cb39119f90 | |
parent | 29e02b45c668d6ba31496f72fd87e4da9663bb23 (diff) | |
download | brdo-c5fea4f88a62b02c7d3c78087815b77fc6efcdb3.tar.gz brdo-c5fea4f88a62b02c7d3c78087815b77fc6efcdb3.tar.bz2 |
- Rollback of #634310
-rw-r--r-- | includes/common.inc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/includes/common.inc b/includes/common.inc index 85c115af8..9c4ce49f8 100644 --- a/includes/common.inc +++ b/includes/common.inc @@ -5026,6 +5026,9 @@ function drupal_render(&$elements) { return; } + // Get the children of the element, sorted by weight. + $children = element_children($elements, TRUE); + // Initialize this element's #children, unless a #pre_render callback already // preset #children. if (!isset($elements['#children'])) { @@ -5040,8 +5043,7 @@ function drupal_render(&$elements) { // This is the same process as drupal_render_children() but is inlined // for speed. if ($elements['#children'] == '') { - // Iterate through the children of the element, sorted by weight. - foreach (element_children($elements, TRUE) as $key) { + foreach ($children as $key) { $elements['#children'] .= drupal_render($elements[$key]); } } |