^t; start in current root rather then in site root.
This commit is contained in:
parent
a62d7c3fbe
commit
223c4cec0a
2 changed files with 12 additions and 2 deletions
|
|
@ -23,5 +23,5 @@
|
|||
- Updated the Form subsystem to use the new calendar for date and time
|
||||
fields.
|
||||
- Bugfix 859816 : DataForm - security issues. Tnx Gabor for reporting.
|
||||
|
||||
- ^t; now starts in current root rather then in site root.
|
||||
|
||||
|
|
|
|||
|
|
@ -19,13 +19,23 @@ use WebGUI::Session;
|
|||
sub process {
|
||||
my ($temp, $tree, @param);
|
||||
@param = WebGUI::Macro::getParams($_[0]);
|
||||
$tree = WebGUI::Navigation::tree(1,1);
|
||||
my $root = _findRoot($session{page}{pageId});
|
||||
$tree = WebGUI::Navigation::tree($root,1);
|
||||
$temp = '<span class="horizontalMenu">';
|
||||
$temp .= WebGUI::Navigation::drawHorizontal($tree,$param[0]);
|
||||
$temp .= '</span>';
|
||||
return $temp;
|
||||
}
|
||||
|
||||
sub _findRoot {
|
||||
my ($pageId,$parentId) = WebGUI::SQL->quickArray("select pageId,parentId from page where pageId=$_[0]");
|
||||
if ($parentId == $_[1]) {
|
||||
return $pageId;
|
||||
} else {
|
||||
return _findRoot($parentId);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
1;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue