From c4dda6afdfe780288bffaebcde485b32b91731d6 Mon Sep 17 00:00:00 2001
From: Anika Henke <anika@selfthinker.org>
Date: Tue, 31 Jan 2012 00:21:07 +0000
Subject: [PATCH] fixed .curid to always highlight the current ID of the
 main/viewed page

---
 inc/parser/xhtml.php | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/inc/parser/xhtml.php b/inc/parser/xhtml.php
index bfa22d066..8d1eb24c1 100644
--- a/inc/parser/xhtml.php
+++ b/inc/parser/xhtml.php
@@ -566,6 +566,7 @@ class Doku_Renderer_xhtml extends Doku_Renderer {
     function internallink($id, $name = NULL, $search=NULL,$returnonly=false,$linktype='content') {
         global $conf;
         global $ID;
+        global $INFO;
 
         $params = '';
         $parts = explode('?', $id, 2);
@@ -610,7 +611,7 @@ class Doku_Renderer_xhtml extends Doku_Renderer {
         $link['pre']    = '';
         $link['suf']    = '';
         // highlight link to current page
-        if ($id == $ID) {
+        if ($id == $INFO['id']) {
             $link['pre']    = '<span class="curid">';
             $link['suf']    = '</span>';
         }
-- 
GitLab