MDL-13244 - weblib - Add 'summary' attribute to print_table()

This commit is contained in:
fmarier
2008-01-31 22:21:52 +00:00
parent 34f06f743b
commit bb4bab500b
+4
View File
@@ -4625,6 +4625,7 @@ function print_png($url, $sizex, $sizey, $return, $parameters='alt=""') {
* <li>$table->class - class attribute to put on the table
* <li>$table->id - id attribute to put on the table.
* <li>$table->rowclass[] - classes to add to particular rows.
* <li>$table->summary - Description of the contents for screen readers.
* </ul>
* @param bool $return whether to return an output string or echo now
* @return boolean or $string
@@ -4684,6 +4685,9 @@ function print_table($table, $return=false) {
$tableid = empty($table->id) ? '' : 'id="'.$table->id.'"';
$output .= '<table width="'.$table->width.'" ';
if (!empty($table->summary)) {
$output .= " summary=\"$table->summary\"";
}
$output .= " cellpadding=\"$table->cellpadding\" cellspacing=\"$table->cellspacing\" class=\"$table->class boxalign$table->tablealign\" $tableid>\n";
$countcols = 0;