diff options
author | Adrian Lang <lang@cosmocode.de> | 2010-03-01 14:55:47 +0100 |
---|---|---|
committer | Adrian Lang <lang@cosmocode.de> | 2010-03-01 14:56:44 +0100 |
commit | d9e36cbead0f9eaf3ffdd0bd1249dbe39fc9cb30 (patch) | |
tree | b538ab75b611138e6d2bc5a6096df53b47907485 /inc/parser/xhtml.php | |
parent | 7ec82fe2c0b2e1ddf4558410e18e3161a8f8b22b (diff) | |
download | rpg-d9e36cbead0f9eaf3ffdd0bd1249dbe39fc9cb30.tar.gz rpg-d9e36cbead0f9eaf3ffdd0bd1249dbe39fc9cb30.tar.bz2 |
Show last edit section button again
Diffstat (limited to 'inc/parser/xhtml.php')
-rw-r--r-- | inc/parser/xhtml.php | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/inc/parser/xhtml.php b/inc/parser/xhtml.php index 2638cb240..552a8332d 100644 --- a/inc/parser/xhtml.php +++ b/inc/parser/xhtml.php @@ -58,19 +58,20 @@ class Doku_Renderer_xhtml extends Doku_Renderer { /** * Finish an edit section range * - * @param $pos int The byte position for the edit end + * @param $end int The byte position for the edit end; null for the rest of + the page * @author Adrian Lang <lang@cosmocode.de> */ - protected function finishSectionEdit($end) { + protected function finishSectionEdit($end = null) { list($id, $start, $type, $title) = array_pop($this->sectionedits); - if ($end <= $start) { + if (!is_null($end) && $end <= $start) { return; } $this->doc .= "<!-- EDIT$id " . strtoupper($type) . ' '; if (!is_null($title)) { $this->doc .= '"' . str_replace('"', '', $title) . '" '; } - $this->doc .= "[$start-" . ($end === 0 ? '' : $end) . '] -->'; + $this->doc .= "[$start-" . (is_null($end) ? '' : $end) . '] -->'; } function getFormat(){ @@ -92,7 +93,7 @@ class Doku_Renderer_xhtml extends Doku_Renderer { // marker. array_pop($this->sectionedits); } else { - $this->finishSectionEdit(0); + $this->finishSectionEdit(); } } |