summaryrefslogtreecommitdiff
path: root/inc/parser
diff options
context:
space:
mode:
authorGuy Brand <gb@unistra.fr>2013-03-06 14:08:08 +0100
committerGuy Brand <gb@unistra.fr>2013-03-06 14:08:08 +0100
commit23678e344b4ddcad14254c106ecb93af174fdaa0 (patch)
treea5c787e4d87313a7fb6f18cb4c78bf210d92d60c /inc/parser
parent847cef0a6bfd2ff9dc54e1fc140f5ba0ece0017a (diff)
parent5721a1547938df76003c6d91ea003dc1c70abd94 (diff)
downloadrpg-23678e344b4ddcad14254c106ecb93af174fdaa0.tar.gz
rpg-23678e344b4ddcad14254c106ecb93af174fdaa0.tar.bz2
Merge branch 'master' into stable
Diffstat (limited to 'inc/parser')
-rw-r--r--inc/parser/code.php2
-rw-r--r--inc/parser/metadata.php41
-rw-r--r--inc/parser/renderer.php7
-rw-r--r--inc/parser/xhtml.php9
4 files changed, 10 insertions, 49 deletions
diff --git a/inc/parser/code.php b/inc/parser/code.php
index 21fb0dc3c..43d8d703f 100644
--- a/inc/parser/code.php
+++ b/inc/parser/code.php
@@ -43,7 +43,7 @@ class Doku_Renderer_code extends Doku_Renderer {
* This should never be reached, if it is send a 404
*/
function document_end() {
- header("HTTP/1.0 404 Not Found");
+ http_status(404);
echo '404 - Not found';
exit;
}
diff --git a/inc/parser/metadata.php b/inc/parser/metadata.php
index 8bfdc3b9c..8638ffa6a 100644
--- a/inc/parser/metadata.php
+++ b/inc/parser/metadata.php
@@ -133,27 +133,6 @@ class Doku_Renderer_metadata extends Doku_Renderer {
}
}
- function strong_open(){}
- function strong_close(){}
-
- function emphasis_open(){}
- function emphasis_close(){}
-
- function underline_open(){}
- function underline_close(){}
-
- function monospace_open(){}
- function monospace_close(){}
-
- function subscript_open(){}
- function subscript_close(){}
-
- function superscript_open(){}
- function superscript_close(){}
-
- function deleted_open(){}
- function deleted_close(){}
-
/**
* Callback for footnote start syntax
*
@@ -218,14 +197,6 @@ class Doku_Renderer_metadata extends Doku_Renderer {
if ($this->capture) $this->doc .= $text;
}
- function php($text){}
-
- function phpblock($text){}
-
- function html($text){}
-
- function htmlblock($text){}
-
function preformatted($text){
if ($this->capture) $this->doc .= $text;
}
@@ -393,18 +364,6 @@ class Doku_Renderer_metadata extends Doku_Renderer {
$params['refresh'];
}
- function table_open($maxcols = NULL, $numrows = NULL){}
- function table_close(){}
-
- function tablerow_open(){}
- function tablerow_close(){}
-
- function tableheader_open($colspan = 1, $align = NULL, $rowspan = 1){}
- function tableheader_close(){}
-
- function tablecell_open($colspan = 1, $align = NULL, $rowspan = 1){}
- function tablecell_close(){}
-
//----------------------------------------------------------
// Utils
diff --git a/inc/parser/renderer.php b/inc/parser/renderer.php
index 0923e6896..7df369478 100644
--- a/inc/parser/renderer.php
+++ b/inc/parser/renderer.php
@@ -62,7 +62,7 @@ class Doku_Renderer extends DokuWiki_Plugin {
//handle plugin rendering
function plugin($name,$data){
- $plugin =& plugin_load('syntax',$name);
+ $plugin = plugin_load('syntax',$name);
if($plugin != null){
$plugin->render($this->getFormat(),$this,$data);
}
@@ -274,9 +274,10 @@ class Doku_Renderer extends DokuWiki_Plugin {
list($name,$hash) = explode('#',$name,2);
if($hash) return $hash;
- $name = strtr($name,';',':');
if($conf['useslash']){
- $name = strtr($name,'/',':');
+ $name = strtr($name,';/',';:');
+ }else{
+ $name = strtr($name,';',':');
}
return noNSorNS($name);
diff --git a/inc/parser/xhtml.php b/inc/parser/xhtml.php
index b4e78a530..84a999e56 100644
--- a/inc/parser/xhtml.php
+++ b/inc/parser/xhtml.php
@@ -30,6 +30,7 @@ class Doku_Renderer_xhtml extends Doku_Renderer {
var $toc = array(); // will contain the Table of Contents
var $sectionedits = array(); // A stack of section edit data
+ private $lastsecid = 0; // last section edit id, used by startSectionEdit
var $headers = array();
var $footnotes = array();
@@ -50,9 +51,8 @@ class Doku_Renderer_xhtml extends Doku_Renderer {
* @author Adrian Lang <lang@cosmocode.de>
*/
public function startSectionEdit($start, $type, $title = null) {
- static $lastsecid = 0;
- $this->sectionedits[] = array(++$lastsecid, $start, $type, $title);
- return 'sectionedit' . $lastsecid;
+ $this->sectionedits[] = array(++$this->lastsecid, $start, $type, $title);
+ return 'sectionedit' . $this->lastsecid;
}
/**
@@ -803,6 +803,7 @@ class Doku_Renderer_xhtml extends Doku_Renderer {
$class = preg_replace('/[^_\-a-z0-9]+/i','_',$ext);
$link['class'] .= ' mediafile mf_'.$class;
$link['url'] = ml($src,array('id'=>$ID,'cache'=>$cache),true);
+ if ($exists) $link['title'] .= ' (' . filesize_h(filesize(mediaFN($src))).')';
}
if($hash) $link['url'] .= '#'.$hash;
@@ -888,7 +889,7 @@ class Doku_Renderer_xhtml extends Doku_Renderer {
// title is escaped by SimplePie, we unescape here because it
// is escaped again in externallink() FS#1705
$this->externallink($item->get_permalink(),
- htmlspecialchars_decode($item->get_title()));
+ html_entity_decode($item->get_title(), ENT_QUOTES, 'UTF-8'));
}else{
$this->doc .= ' '.$item->get_title();
}