From 947fa1988384edf953a01a838184426cfaec011a Mon Sep 17 00:00:00 2001
From: andi <andi@splitbrain.org>
Date: Mon, 9 May 2005 22:43:43 +0200
Subject: [PATCH] don't use static for footnote ids (bad in feed environment)

darcs-hash:20050509204343-9977f-264ebc54c3dee9e8e9ee4368d9a06af1fb486168.gz
---
 inc/parser/xhtml.php | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/inc/parser/xhtml.php b/inc/parser/xhtml.php
index e61094f86..e585f346e 100644
--- a/inc/parser/xhtml.php
+++ b/inc/parser/xhtml.php
@@ -207,7 +207,8 @@ class Doku_Renderer_xhtml extends Doku_Renderer {
      * @author Andreas Gohr <andi@splitbrain.org>
      */
     function footnote_open() {
-        $id = $this->_newFootnoteId();
+        #$id = $this->_newFootnoteId();
+        $id = count($this->footnotes)+1;
         $this->doc .= '<a href="#fn'.$id.'" name="fnt'.$id.'" class="fn_top">'.$id.')</a>';
 
         // move current content to store and record footnote
@@ -922,11 +923,6 @@ class Doku_Renderer_xhtml extends Doku_Renderer {
         return $ret;
     }
     
-    function _newFootnoteId() {
-        static $id = 1;
-        return $id++;
-    }
-    
     function _xmlEntities($string) {
         return htmlspecialchars($string);
     }
-- 
GitLab