diff options
-rw-r--r-- | includes/theme.inc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/includes/theme.inc b/includes/theme.inc index 7a7e7e66f..47c2ff29f 100644 --- a/includes/theme.inc +++ b/includes/theme.inc @@ -697,8 +697,7 @@ function theme_submenu($links) { * @return * An HTML string representing the table. */ -function theme_table($header, $rows, $attributes = NULL, $caption = NULL) { - +function theme_table($header, $rows, $attributes = array(), $caption = NULL) { $output = '<table'. drupal_attributes($attributes) .">\n"; if (isset($caption)) { @@ -708,15 +707,16 @@ function theme_table($header, $rows, $attributes = NULL, $caption = NULL) { // Format the table header: if (count($header)) { $ts = tablesort_init($header); - $output .= ' <tr>'; + $output .= ' <thead><tr>'; foreach ($header as $cell) { $cell = tablesort_header($cell, $header, $ts); $output .= _theme_table_cell($cell, 1); } - $output .= " </tr>\n"; + $output .= " </tr></thead>\n"; } // Format the table rows: + $output .= "<tbody>\n"; if (count($rows)) { foreach ($rows as $number => $row) { $attributes = array(); @@ -756,7 +756,7 @@ function theme_table($header, $rows, $attributes = NULL, $caption = NULL) { } } - $output .= "</table>\n"; + $output .= "</tbody></table>\n"; return $output; } |