diff options
author | andi <andi@splitbrain.org> | 2005-04-17 17:40:42 +0200 |
---|---|---|
committer | andi <andi@splitbrain.org> | 2005-04-17 17:40:42 +0200 |
commit | 6bbae53816f31e7ad2c6536866674c218c63f6a4 (patch) | |
tree | 59e1d2a025dab375d5724137915f1a17f34ed59c /inc/html.php | |
parent | 15cfe3031ce6b583a235b74987e5e6700767fdf1 (diff) | |
download | rpg-6bbae53816f31e7ad2c6536866674c218c63f6a4.tar.gz rpg-6bbae53816f31e7ad2c6536866674c218c63f6a4.tar.bz2 |
fixed preview
darcs-hash:20050417154042-9977f-a599079671a126c53c508de5ac1ea5da734c933d.gz
Diffstat (limited to 'inc/html.php')
-rw-r--r-- | inc/html.php | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/inc/html.php b/inc/html.php index 8cac264b1..0e1364316 100644 --- a/inc/html.php +++ b/inc/html.php @@ -8,6 +8,8 @@ if(!defined('DOKU_INC')) define('DOKU_INC',realpath(dirname(__FILE__).'/../').'/'); + require_once(DOKU_INC.'inc/parserutils.php'); + /** * Convenience function to quickly build a wikilink * @@ -84,9 +86,12 @@ function html_login(){ ?> </div> <? +/* + FIXME provide new hook if(@file_exists('includes/login.txt')){ print io_cacheParse('includes/login.txt'); } +*/ } /** @@ -257,26 +262,28 @@ function html_list_toc($item){ * * @author Andreas Gohr <andi@splitbrain.org> */ -function html_show($text=''){ +function html_show($txt=''){ global $ID; global $REV; global $HIGH; //disable section editing for old revisions or in preview if($text || $REV){ - global $parser; - $parser['secedit'] = false; + $secedit = false; + }else{ + $secedit = true; } - - if ($text){ + + if ($txt){ //PreviewHeader print p_locale_xhtml('preview'); print '<div class="preview">'; - print html_secedit(parse($text),false); + print html_secedit(p_render_xhtml(p_get_instructions($txt)),$secedit); print '</div>'; + }else{ if ($REV) print p_locale_xhtml('showrev'); $html = p_wiki_xhtml($ID,$REV,true); - $html = html_secedit($html); + $html = html_secedit($html,$secedit); print html_hilight($html,$HIGH); } } |