From f979303813d03180456b68681ba588af6ccc1207 Mon Sep 17 00:00:00 2001 From: Ian C Date: Sun, 5 Feb 2006 01:22:26 +0000 Subject: Fixed so that generated lists are a bit more proper. Also works properly in IE. --- php/leftbar.php | 27 ++++++++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) diff --git a/php/leftbar.php b/php/leftbar.php index f2eb7bd..080243c 100644 --- a/php/leftbar.php +++ b/php/leftbar.php @@ -43,7 +43,7 @@ function LB_LeftHeader($hdr) function LB_TopLink($url,$txt) { - printf('',$url,$txt); + printf('%s',$url,$txt); } function LB_SubLink($url,$txt) @@ -60,12 +60,20 @@ function LB_OpenLink(&$is_open) } } -function LB_OpenSub(&$is_open) +function LB_OpenLinkItem(&$is_open) { if (!$is_open) { $is_open = TRUE; echo ''; } } @@ -103,6 +119,7 @@ function LeftBar($file, $context = '') $curcontext = ''; $in_link = FALSE; $in_sub = FALSE; + $in_linkitem = FALSE; while (!feof($fp)) { @@ -131,6 +148,7 @@ function LeftBar($file, $context = '') if (count($tok)==2) { LB_CloseSub($in_sub); + LB_CloseLinkItem($in_linkitem); LB_CloseLink($in_link); LB_LeftHeader($tok[1]); } @@ -144,7 +162,9 @@ function LeftBar($file, $context = '') if (count($tok)==3) { LB_CloseSub($in_sub); + LB_CloseLinkItem($in_linkitem); LB_OpenLink($in_link); + LB_OpenLinkItem($in_linkitem); $ldef = $links[$tok[1]]; $curcontext = $tok[2]; LB_TopLink($ldef->url,$ldef->text); @@ -179,6 +199,7 @@ function LeftBar($file, $context = '') } LB_CloseSub($in_sub); + LB_CloseLinkItem($in_linkitem); LB_CloseLink($in_link); fclose($fp); -- cgit v1.2.3