diff options
author | Andreas Gohr <andi@splitbrain.org> | 2014-09-29 18:29:20 +0200 |
---|---|---|
committer | Andreas Gohr <andi@splitbrain.org> | 2014-09-29 18:29:20 +0200 |
commit | 17553fca1944b80c25826f2f71620bbf64e1a49b (patch) | |
tree | 45716d17564d0ea39cda4b0f6961b757e382c068 /inc/parserutils.php | |
parent | 2f981761b3f5b7c8dcc53b8026d9fd3c499a7e1e (diff) | |
parent | 80d9f3ddb3a602960d23f1849c1ad6287c4f9d92 (diff) | |
download | rpg-17553fca1944b80c25826f2f71620bbf64e1a49b.tar.gz rpg-17553fca1944b80c25826f2f71620bbf64e1a49b.tar.bz2 |
Merge pull request #624 from lisps/revisions
date_at support
Diffstat (limited to 'inc/parserutils.php')
-rw-r--r-- | inc/parserutils.php | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/inc/parserutils.php b/inc/parserutils.php index 9c2a0b570..4aebec2c8 100644 --- a/inc/parserutils.php +++ b/inc/parserutils.php @@ -56,7 +56,7 @@ define('METADATA_RENDER_UNLIMITED', 4); * * @author Andreas Gohr <andi@splitbrain.org> */ -function p_wiki_xhtml($id, $rev='', $excuse=true){ +function p_wiki_xhtml($id, $rev='', $excuse=true,$date_at=''){ $file = wikiFN($id,$rev); $ret = ''; @@ -65,9 +65,9 @@ function p_wiki_xhtml($id, $rev='', $excuse=true){ $keep = $ID; $ID = $id; - if($rev){ + if($rev || $date_at){ if(@file_exists($file)){ - $ret = p_render('xhtml',p_get_instructions(io_readWikiPage($file,$id,$rev)),$info); //no caching on old revisions + $ret = p_render('xhtml',p_get_instructions(io_readWikiPage($file,$id,$rev)),$info,$date_at); //no caching on old revisions }elseif($excuse){ $ret = p_locale_xhtml('norev'); } @@ -583,7 +583,7 @@ function p_sort_modes($a, $b){ * @author Harry Fuecks <hfuecks@gmail.com> * @author Andreas Gohr <andi@splitbrain.org> */ -function p_render($mode,$instructions,&$info){ +function p_render($mode,$instructions,&$info,$date_at=''){ if(is_null($instructions)) return ''; $Renderer = p_get_renderer($mode); @@ -591,6 +591,10 @@ function p_render($mode,$instructions,&$info){ $Renderer->reset(); + if($date_at) { + $Renderer->date_at = $date_at; + } + $Renderer->smileys = getSmileys(); $Renderer->entities = getEntities(); $Renderer->acronyms = getAcronyms(); |