navigation depthis template var now allows for negative values

This commit is contained in:
JT Smith 2005-04-29 15:49:58 +00:00
parent 25319188b0
commit da2623bea4
2 changed files with 3 additions and 2 deletions

View file

@ -38,6 +38,7 @@
- Added a cache disabling config option for developers who are testing
performance.
- fix [ 1190834 ] Pagination of event calendar does not work for firefox
- Navigation depthIs template variables now allow for negative values.
6.5.6

View file

@ -397,9 +397,9 @@ sub view {
$pageData->{"page.depthIs".$pageData->{"page.absDepth"}} = 1;
$pageData->{"page.relativeDepthIs".$pageData->{"page.relDepth"}} = 1;
my $depthDiff = ($absoluteDepthOfLastPage) ? ($absoluteDepthOfLastPage - $pageData->{'page.absDepth'}) : 0;
$pageData->{"page.depthDiff"} = $depthDiff;
$pageData->{"page.depthDiffIs".$depthDiff} = 1;
if ($depthDiff > 0) {
$pageData->{"page.depthDiff"} = $depthDiff if ($depthDiff > 0);
$pageData->{"page.depthDiffIs".$depthDiff} = 1;
push(@{$pageData->{"page.depthDiff_loop"}},{}) for(1..$depthDiff);
}
$absoluteDepthOfLastPage = $pageData->{"page.absDepth"};