summaryrefslogtreecommitdiff
path: root/inc/parser
diff options
context:
space:
mode:
authorAdrian Lang <lang@cosmocode.de>2010-02-08 12:50:20 +0100
committerAdrian Lang <lang@cosmocode.de>2010-02-08 12:53:02 +0100
commit40868f2faa85215dfea2fa0c82274a4806d042ab (patch)
tree76bd582d98c89d22818de3622a86c29469036835 /inc/parser
parent6c1f778cae7a02dec2e14017e539d541ce6e74fb (diff)
downloadrpg-40868f2faa85215dfea2fa0c82274a4806d042ab.tar.gz
rpg-40868f2faa85215dfea2fa0c82274a4806d042ab.tar.bz2
Hide secedit buttons without title
Diffstat (limited to 'inc/parser')
-rw-r--r--inc/parser/xhtml.php12
1 files changed, 7 insertions, 5 deletions
diff --git a/inc/parser/xhtml.php b/inc/parser/xhtml.php
index 9de712303..3ac8ed35c 100644
--- a/inc/parser/xhtml.php
+++ b/inc/parser/xhtml.php
@@ -49,7 +49,7 @@ class Doku_Renderer_xhtml extends Doku_Renderer {
* @return string A marker class for the starting HTML element
* @author Adrian Lang <lang@cosmocode.de>
*/
- protected function startSectionEdit($start, $type, $title) {
+ protected function startSectionEdit($start, $type, $title = null) {
static $lastsecid = 0;
$this->sectionedits[] = array(++$lastsecid, $start, $type, $title);
return 'sectionedit' . $lastsecid;
@@ -63,9 +63,11 @@ class Doku_Renderer_xhtml extends Doku_Renderer {
*/
protected function finishSectionEdit($end) {
list($id, $start, $type, $title) = array_pop($this->sectionedits);
- $this->doc .= "<!-- EDIT$id " . strtoupper($type) . ' "' .
- str_replace('"', '', $title) . "\" [$start-" .
- ($end === 0 ? '' : $end) . "] -->";
+ $this->doc .= "<!-- EDIT$id " . strtoupper($type) . ' ';
+ if (!is_null($title)) {
+ $this->doc .= '"' . str_replace('"', '', $title) . '" ';
+ }
+ $this->doc .= "[$start-" . ($end === 0 ? '' : $end) . '] -->';
}
function getFormat(){
@@ -885,7 +887,7 @@ class Doku_Renderer_xhtml extends Doku_Renderer {
global $lang;
// initialize the row counter used for classes
$this->_counter['row_counter'] = 0;
- $this->doc .= '<table class="inline ' . $this->startSectionEdit($pos, 'table', $lang['table_edit_title']) . '">'.DOKU_LF;
+ $this->doc .= '<table class="inline ' . $this->startSectionEdit($pos, 'table') . '">'.DOKU_LF;
}
function table_close($pos){