From 0a7e3bce2e0ca81b6f8c4e52f78b1ffe443f7ade Mon Sep 17 00:00:00 2001 From: chris Date: Sun, 26 Nov 2006 16:21:44 +0100 Subject: metadata update to support both persistent and non-persistent metadata Key changes: - metadata stored on disk in two arrays, 'current' & 'persistent' - p_set_metadata has an additional parameter, $persistent, which defaults to true - metadata set within the renderer defaults to non-persistent - new event hook, PARSER_METADATA_RENDER, which wraps around metadata rendering process. For full details of this event refer to the event list documentation at splitbrain. The patch includes automatic conversion of metadata in current form to the new format For more details also see http://www.freelists.org/archives/dokuwiki/11-2006/msg00221.html and any follow-up messages. darcs-hash:20061126152144-9b6ab-a4e40c221e0274b13da07dc2fc1d2100f5f3a50e.gz --- inc/parser/metadata.php | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'inc/parser') diff --git a/inc/parser/metadata.php b/inc/parser/metadata.php index be5897231..37122bdb1 100644 --- a/inc/parser/metadata.php +++ b/inc/parser/metadata.php @@ -26,20 +26,15 @@ class Doku_Renderer_metadata extends Doku_Renderer { var $doc = ''; var $meta = array(); + var $persistent = array(); var $headers = array(); var $capture = true; var $store = ''; function document_start(){ - //reset some variables - $this->meta['title'] = ''; - $this->meta['description']['abstract'] = ''; - $this->meta['description']['tableofcontents'] = array(); - $this->meta['relation']['haspart'] = array(); - $this->meta['relation']['references'] = array(); - $this->meta['date']['valid'] = array(); - $this->headers = array(); + // reset metadata to persistent values + $this->meta = $this->persistent; } function document_end(){ -- cgit v1.2.3