diff --git a/inc/parser/renderer.php b/inc/parser/renderer.php index b54ccf050c4eb64b0fb1f71be7bd06d67a2c6806..a178b2457cb4d3e79d763ab8a8122307c1e0c852 100644 --- a/inc/parser/renderer.php +++ b/inc/parser/renderer.php @@ -239,9 +239,9 @@ class Doku_Renderer extends DokuWiki_Plugin { $src,$title=NULL,$align=NULL,$width=NULL,$height=NULL,$cache=NULL ) {} - function table_open($maxcols = NULL, $numrows = NULL, $pos){} + function table_open($maxcols = null, $numrows = null, $pos = null){} - function table_close($pos){} + function table_close($pos = null){} function tablerow_open(){} diff --git a/inc/parser/xhtml.php b/inc/parser/xhtml.php index 5a3d945d195f16184204642dcab423d23a982244..37900b2c3aa189def65d00f1d76ceb13b6766c97 100644 --- a/inc/parser/xhtml.php +++ b/inc/parser/xhtml.php @@ -902,16 +902,23 @@ class Doku_Renderer_xhtml extends Doku_Renderer { } // $numrows not yet implemented - function table_open($maxcols = NULL, $numrows = NULL, $pos){ + function table_open($maxcols = null, $numrows = null, $pos = null){ global $lang; // initialize the row counter used for classes $this->_counter['row_counter'] = 0; - $this->doc .= '<div class="table ' . $this->startSectionEdit($pos, 'table') . '"><table class="inline">'.DOKU_LF; + $class = 'table'; + if ($pos !== null) { + $class .= ' ' . $this->startSectionEdit($pos, 'table'); + } + $this->doc .= '<div class="' . $class . '"><table class="inline">' . + DOKU_LF; } - function table_close($pos){ + function table_close($pos = null){ $this->doc .= '</table></div>'.DOKU_LF; - $this->finishSectionEdit($pos); + if ($pos !== null) { + $this->finishSectionEdit($pos); + } } function tablerow_open(){