diff options
author | Thomas Bruederli <thomas@roundcube.net> | 2012-10-04 11:46:54 +0200 |
---|---|---|
committer | Thomas Bruederli <thomas@roundcube.net> | 2012-10-04 11:46:54 +0200 |
commit | ae44bf4dc76dcc686907d99c8ff208bf952b9ff6 (patch) | |
tree | 57cdd925620499404aa8d63005017ca28ccb96bc /program/include | |
parent | 7f64d7c2e4a38870eb225e6dcb15f60a7af63bfc (diff) |
Consider colspan attributes when adding table cells/rows
Diffstat (limited to 'program/include')
-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 948794283..234985241 100644 --- a/program/include/html.php +++ b/program/include/html.php @@ -681,9 +681,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(); } } |