From 8e19d799f6bc5b668f8a241464d2e544611d079f Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Wed, 11 Nov 2009 08:52:53 +0000 Subject: - Patch #619902 by sun: performance improvement: dashboard, region and block building had unnecessary function calls. --- includes/form.inc | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'includes') 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 '
' . $element['#children'] . '
'; + if (!isset($element['#attributes']['id'])) { + $element['#attributes']['id'] = drupal_html_id($element['#id']); + } + // Force the 'form-wrapper' class. + $element['#attributes']['class'][] = 'form-wrapper'; + return '' . $element['#children'] . ''; } /** -- cgit v1.2.3