From: Michael M Slusarz Date: Sun, 7 Mar 2010 05:59:34 +0000 (-0700) Subject: Fix URL linking on help node with no children X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=088126639a0190dd2b2ca71b1f9dbe595a86adf9;p=horde.git Fix URL linking on help node with no children --- 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); }