commit 2894d8577652c775d9ede756b653f0e34c2d5f3c Author: Thomas Lattimore Date: Tue Aug 6 09:37:24 2013 -0400 Making changes suggested in https://drupal.org/node/1898070#comment-7714611 diff --git a/core/modules/file/file.field.inc b/core/modules/file/file.field.inc index eb08e11..5f14ead 100644 --- a/core/modules/file/file.field.inc +++ b/core/modules/file/file.field.inc @@ -605,7 +605,7 @@ function template_preprocess_file_widget(&$variables) { } $variables['element'] = drupal_render_children($element); // The "form-managed-file" class is required for proper Ajax functionality. - $variables['attributes'] = new Attribute(array('class' => array('file-widget', 'form-managed-file', 'clearfix'))); + $variables['attributes'] = array('class' => array('file-widget', 'form-managed-file', 'clearfix')); } /** @@ -716,7 +716,7 @@ function template_preprocess_file_widget_multiple(&$variables) { ); $output = empty($rows) ? '' : drupal_render($build); - $variables['element'] = drupal_render_children($element); + $variables['element'] = drupal_render($element); } /** diff --git a/core/modules/file/file.module b/core/modules/file/file.module index 039a057..f86ded2 100644 --- a/core/modules/file/file.module +++ b/core/modules/file/file.module @@ -1518,8 +1518,8 @@ function template_preprocess_file_managed_file(&$variables) { } $attributes['class'][] = 'form-managed-file'; - $variables['attributes'] = new Attribute($attributes); - $variables['element'] = drupal_render_children($element); + $variables['attributes'] = $attributes; + $variables['element'] = drupal_render($element); } /** @@ -1581,7 +1581,7 @@ function template_preprocess_file_link(&$variables) { '#uri' => file_icon_url($file_entity, $icon_directory), '#alt' => '', '#title' => check_plain($file_entity->getFilename()), - '#attributes' => new Attribute(array('class' => 'file-icon')), + '#attributes' => array('class' => 'file-icon'), ); // Set options as per anchor format described at @@ -1608,7 +1608,7 @@ function template_preprocess_file_link(&$variables) { ); $variables['link'] = l($link_text, $url, $options); - $variables['attributes'] = new Attribute(array('class' => array('file'))); + $variables['attributes'] = array('class' => array('file')); } /** diff --git a/core/modules/file/templates/file-formatter-table.html.twig b/core/modules/file/templates/file-formatter-table.html.twig index d6a62e0..71e3dc2 100644 --- a/core/modules/file/templates/file-formatter-table.html.twig +++ b/core/modules/file/templates/file-formatter-table.html.twig @@ -6,7 +6,6 @@ * Available variables: * - content: File form element HTML. * - * @see template_preprocess() * @see template_preprocess_file_formatter_table() * * @ingroup themeable diff --git a/core/modules/file/templates/file-link.html.twig b/core/modules/file/templates/file-link.html.twig index 9374587..ba0bea5 100644 --- a/core/modules/file/templates/file-link.html.twig +++ b/core/modules/file/templates/file-link.html.twig @@ -9,7 +9,6 @@ * - icon: An icon as produced by file-icon.html.twig. * - link: A rendered hyperlink. * - * @see template_preprocess() * @see template_preprocess_file_link() * * @ingroup themeable diff --git a/core/modules/file/templates/file-managed-file.html.twig b/core/modules/file/templates/file-managed-file.html.twig index 95ce674..9a33ae1 100644 --- a/core/modules/file/templates/file-managed-file.html.twig +++ b/core/modules/file/templates/file-managed-file.html.twig @@ -7,7 +7,6 @@ * - element: Form element for the file upload. * - attributes: HTML attributes for the containing element. * - * @see template_preprocess() * @see template_preprocess_file_managed_file() * * @ingroup themeable diff --git a/core/modules/file/templates/file-upload-help.html.twig b/core/modules/file/templates/file-upload-help.html.twig index 9384231..fe6554c 100644 --- a/core/modules/file/templates/file-upload-help.html.twig +++ b/core/modules/file/templates/file-upload-help.html.twig @@ -6,7 +6,6 @@ * Available variables: * - descriptions: Lines of help text for uploading a file. * - * @see template_preprocess() * @see template_preprocess_file_upload_help() * * @ingroup themeable diff --git a/core/modules/file/templates/file-widget-multiple.html.twig b/core/modules/file/templates/file-widget-multiple.html.twig index b53f5c8..25534a5 100644 --- a/core/modules/file/templates/file-widget-multiple.html.twig +++ b/core/modules/file/templates/file-widget-multiple.html.twig @@ -7,7 +7,6 @@ * - table: Table of previously uploaded files. * - element: The form element for uploading another file. * - * @see template_preprocess() * @see template_preprocess_file_widget_multiple() * * @ingroup themeable diff --git a/core/modules/file/templates/file-widget.html.twig b/core/modules/file/templates/file-widget.html.twig index bdc43c8..892ed3d 100644 --- a/core/modules/file/templates/file-widget.html.twig +++ b/core/modules/file/templates/file-widget.html.twig @@ -7,7 +7,6 @@ * - element: Form element for the managed file. * - attributes: Remaining HTML attributes for the containing element. * - * @see template_preprocess() * @see template_preprocess_file_widget() * * @ingroup themeable