Skip to content
Permalink
Browse files

MDL-47790 core_outputcomponents: added one more <tr> around <td clspa…

…n="xx"> when $table->data[] = "hr" is provided
  • Loading branch information...
Kordan Jetha Chan
Kordan authored and Jetha Chan committed Oct 22, 2014
1 parent 6ef51ef commit 18e749e45e5f588af7c0a9f250726ef12a325e8b
Showing with 6 additions and 2 deletions.
  1. +6 −2 lib/outputcomponents.php
@@ -1562,7 +1562,11 @@ public static function table(html_table $table) {
foreach ($table->data as $key => $row) {
if (($row === 'hr') && ($countcols)) {
$output .= html_writer::tag('td', html_writer::tag('div', '', array('class' => 'tabledivider')), array('colspan' => $countcols));
$output .= html_writer::start_tag('tr');
$output .= html_writer::start_tag('td', array('colspan' => $countcols));
$output .= html_writer::tag('div', '', array('class' => 'tabledivider'));
$output .= html_writer::end_tag('td');
$output .= html_writer::end_tag('tr') . "\n";
} else {
// Convert array rows to html_table_rows and cell strings to html_table_cell objects
if (!($row instanceof html_table_row)) {
@@ -1636,8 +1640,8 @@ public static function table(html_table $table) {
}
$output .= html_writer::tag($tagtype, $cell->text, $tdattributes) . "\n";
}
$output .= html_writer::end_tag('tr') . "\n";
}
$output .= html_writer::end_tag('tr') . "\n";
}
$output .= html_writer::end_tag('tbody') . "\n";
}

0 comments on commit 18e749e

Please sign in to comment.
You can’t perform that action at this time.