fixed [ 1315408 ] Navigation sometimes fails to use correct startpoint

This commit is contained in:
JT Smith 2005-10-12 21:22:38 +00:00
parent 6a7da04502
commit 4ff015bda0
2 changed files with 3 additions and 11 deletions

View file

@ -1,5 +1,7 @@
6.7.7 6.7.7
- fix [ 1324128 ] Help: List of Available Macros not working - fix [ 1324128 ] Help: List of Available Macros not working
- fix [ 1315408 ] Navigation sometimes fails to use correct startpoint
6.7.6 6.7.6
- Fixed invalid i18n keys that were causing missing labels. - Fixed invalid i18n keys that were causing missing labels.

View file

@ -317,17 +317,7 @@ sub view {
$start = WebGUI::Asset->newByLineage(substr($current->get("lineage"),0, ($self->get("startPoint") + 1) * 6)); $start = WebGUI::Asset->newByLineage(substr($current->get("lineage"),0, ($self->get("startPoint") + 1) * 6));
} }
} elsif ($self->get("startType") eq "relativeToCurrentUrl") { } elsif ($self->get("startType") eq "relativeToCurrentUrl") {
if ($self->get("startPoint") < 0) { $start = WebGUI::Asset->newByLineage(substr($current->get("lineage"),0, ($current->getLineageLength + $self->get("startPoint")) * 6));
$start = WebGUI::Asset->newByLineage(substr($current->get("lineage"),0,
($current->getLineageLength - $self->get("startPoint") + 1) * 6))
if (($current->getLineageLength + $self->get("startPoint") + 1) * 6);
} elsif ($self->get("startPoint") > 0) {
my $lineage = $current->get("lineage");
for (1..$self->get("startPoint")) {
$lineage .= $self->formatRank($_);
}
$start = WebGUI::Asset->newByLineage($lineage);
}
} }
$start = $current unless (defined $start); # if none of the above results in a start point, then the current page must be it $start = $current unless (defined $start); # if none of the above results in a start point, then the current page must be it
my @includedRelationships = split("\n",$self->get("assetsToInclude")); my @includedRelationships = split("\n",$self->get("assetsToInclude"));