From 088126639a0190dd2b2ca71b1f9dbe595a86adf9 Mon Sep 17 00:00:00 2001 From: Michael M Slusarz Date: Sat, 6 Mar 2010 22:59:34 -0700 Subject: [PATCH] Fix URL linking on help node with no children --- horde/services/help/index.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/horde/services/help/index.php b/horde/services/help/index.php index ae5f82b00..6a7433af9 100644 --- a/horde/services/help/index.php +++ b/horde/services/help/index.php @@ -93,6 +93,11 @@ case 'sidebar': $node_params = $node_params_master; $parent = null; + $node_params['url'] = $base_url->copy()->add(array( + 'show' => 'entry', + 'topic' => $id + )); + /* If the title doesn't begin with :: then replace all * double colons with single colons. */ if (substr($title, 0, 2) != '::') { @@ -111,11 +116,8 @@ case 'sidebar': $idx .= '|' . $name; if (empty($added_nodes[$idx])) { $added_nodes[$idx] = true; - if (!count($levels)) { - $node_params['url'] = $base_url->copy()->add(array( - 'show' => 'entry', - 'topic' => $id - )); + if (count($levels)) { + unset($node_params['url']); } $tree->addNode($idx, $parent, $name, 0, false, $node_params); } -- 2.11.0