summaryrefslogtreecommitdiff
path: root/inc/parser
diff options
context:
space:
mode:
authorAdrian Lang <mail@adrianlang.de>2010-10-12 09:04:10 +0200
committerAdrian Lang <mail@adrianlang.de>2010-10-12 09:04:42 +0200
commit619736fd241e830980b303591b0d809c812b1718 (patch)
tree6fa11dbe2009b82bbad21675aca98b1ea0093c70 /inc/parser
parent2866ff9d40efeb8c33f0b77f2a14866c37dfcb09 (diff)
downloadrpg-619736fd241e830980b303591b0d809c812b1718.tar.gz
rpg-619736fd241e830980b303591b0d809c812b1718.tar.bz2
Improve compatibility of table instructions handling
Diffstat (limited to 'inc/parser')
-rw-r--r--inc/parser/renderer.php4
-rw-r--r--inc/parser/xhtml.php15
2 files changed, 13 insertions, 6 deletions
diff --git a/inc/parser/renderer.php b/inc/parser/renderer.php
index b54ccf050..a178b2457 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 5a3d945d1..37900b2c3 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(){