diff options
author | Thomas Bruederli <thomas@roundcube.net> | 2012-10-04 11:46:54 +0200 |
---|---|---|
committer | Thomas Bruederli <thomas@roundcube.net> | 2012-10-04 12:02:33 +0200 |
commit | ef7a786b38d36374585be6b5800ce1862b40eb50 (patch) | |
tree | 642b8c5a28f77c99005887e6df61b9d8f41805a3 | |
parent | 834d71e058ddb73b117e272a5f46704164187bf7 (diff) |
Consider colspan attributes when adding table cells/rows
-rw-r--r-- | program/include/html.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/program/include/html.php b/program/include/html.php index dc93b3317..8d0996e1f 100644 --- a/program/include/html.php +++ b/program/include/html.php @@ -643,9 +643,9 @@ class html_table extends html $cell->content = $cont; $this->rows[$this->rowindex]->cells[$this->colindex] = $cell; - $this->colindex++; + $this->colindex += max(1, intval($attr['colspan'])); - if ($this->attrib['cols'] && $this->colindex == $this->attrib['cols']) { + if ($this->attrib['cols'] && $this->colindex >= $this->attrib['cols']) { $this->add_row(); } } |