diff options
author | Dries Buytaert <dries@buytaert.net> | 2009-11-11 08:52:53 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2009-11-11 08:52:53 +0000 |
commit | 8e19d799f6bc5b668f8a241464d2e544611d079f (patch) | |
tree | 8f1f249f23d65c871e37287a7f6e9ea635cb0434 /includes | |
parent | 5cc6df569f7a802d6226a0bec6743a45544ac431 (diff) | |
download | brdo-8e19d799f6bc5b668f8a241464d2e544611d079f.tar.gz brdo-8e19d799f6bc5b668f8a241464d2e544611d079f.tar.bz2 |
- Patch #619902 by sun: performance improvement: dashboard, region and block building had unnecessary function calls.
Diffstat (limited to 'includes')
-rw-r--r-- | includes/form.inc | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/includes/form.inc b/includes/form.inc index 7ddd6125d..daf164368 100644 --- a/includes/form.inc +++ b/includes/form.inc @@ -2200,7 +2200,7 @@ function form_process_container($element, &$form_state) { * @param $element * An associative array containing the properties and children of the * group. - * Properties used: #children. + * Properties used: #id, #attributes, #children. * @return * A themed HTML string representing the form element. * @@ -2208,7 +2208,12 @@ function form_process_container($element, &$form_state) { */ function theme_container($variables) { $element = $variables['element']; - return '<div class="form-wrapper" id="' . $element['#id'] . '">' . $element['#children'] . '</div>'; + if (!isset($element['#attributes']['id'])) { + $element['#attributes']['id'] = drupal_html_id($element['#id']); + } + // Force the 'form-wrapper' class. + $element['#attributes']['class'][] = 'form-wrapper'; + return '<div' . drupal_attributes($element['#attributes']) . '>' . $element['#children'] . '</div>'; } /** |