From ce6b63d97068e71369bad95e7959d0110717bbfd Mon Sep 17 00:00:00 2001 From: chris Date: Sun, 24 Sep 2006 22:21:57 +0200 Subject: cache, metadata & purgefile updates Cache - add dependency for metadata renderer file - check metadata for end of page life, "date valid end". Metadata Renderer - RSS syntax mode now sets rendered page expiry, "date valid end" and includes the feed URL in "relation haspart". Purgefile For all wiki installations the purgefile records the earliest time before which no cache purge (based on data consistency) is required. Cache files older than this time MAY need to be purged. - remove purgeonadd configuration setting darcs-hash:20060924202157-9b6ab-4531e91411c41914eeab2b6a8160c3d46b001cee.gz --- inc/parser/metadata.php | 10 +++++++++- inc/parser/xhtml.php | 2 +- 2 files changed, 10 insertions(+), 2 deletions(-) (limited to 'inc/parser') diff --git a/inc/parser/metadata.php b/inc/parser/metadata.php index fea2d48f2..9704c0475 100644 --- a/inc/parser/metadata.php +++ b/inc/parser/metadata.php @@ -325,7 +325,15 @@ class Doku_Renderer_metadata extends Doku_Renderer { if ($this->capture && $title) $this->doc .= '['.$title.']'; } - function rss($url){} + function rss($url,$params) { + global $conf; + + $this->meta['relation']['haspart'][$url] = true; + $this->meta['date']['valid']['end'] = + empty($this->meta['date']['valid']['end']) ? + time() + $conf['rss_update'] : + min($this->meta['date']['valid']['end'], time() + $conf['rss_update']); + } function table_open($maxcols = NULL, $numrows = NULL){} function table_close(){} diff --git a/inc/parser/xhtml.php b/inc/parser/xhtml.php index c805dae70..c56367f47 100644 --- a/inc/parser/xhtml.php +++ b/inc/parser/xhtml.php @@ -502,7 +502,7 @@ class Doku_Renderer_xhtml extends Doku_Renderer { } //keep hash anchor - list($id,$hash) = split('#',$id,2); + list($id,$hash) = explode('#',$id,2); //prepare for formating $link['target'] = $conf['target']['wiki']; -- cgit v1.2.3