fixed nav bug
This commit is contained in:
parent
0d2bbe87d0
commit
b461d45f6b
3 changed files with 17 additions and 17 deletions
|
|
@ -98,6 +98,7 @@
|
|||
- bugfix [ 1014337 ] WSClient->new error: templateId field missing in
|
||||
database
|
||||
- bugfix [ 991782 ] More Fault Tolerent upgrade_5.9.9-6.0.0.pl
|
||||
- Minor performance enhancements to Navigation system.
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -255,7 +255,6 @@ alter table userSessionScratch change sessionId sessionId char(22) not null;
|
|||
alter table users change referringAffiliate referringAffiliate char(22) not null;
|
||||
alter table page change lft nestedSetLeft int(11);
|
||||
alter table page change rgt nestedSetRight int(11);
|
||||
alter table page change id id char(22);
|
||||
delete from incrementer where incrementerId in ("messageLogId","profileCategoryId","templateId","navigationId","passiveProfileLogId","metaData_fieldId","userId","collateralId","pageId","databaseLinkId", "DataForm_entryId", "DataForm_fieldId", "DataForm_tabId", "EventsCalendar_eventId", "EventsCalendar_recurringId", "FileManager_fileId", "forumId", "forumPostId", "forumThreadId", "groupId", "languageId", "Product_benefitId", "Product_featureId", "Product_specificationId", "replacementId", "Survey_answerId", "Survey_id", "Survey_questionId", "Survey_responseId", "USS_id", "USS_submissionId", "wobjectId");
|
||||
alter table forum change postsPerPage threadsPerPage int(11) default 30;
|
||||
alter table forum add postsPerPage int(11) default 10 after threadsPerPage;
|
||||
|
|
|
|||
|
|
@ -225,7 +225,6 @@ sub build {
|
|||
|
||||
my $cache = WebGUI::Cache->new($self->{_identifier}.'-'.$session{page}{pageId}, "Navigation-".$session{config}{configFile});
|
||||
my $cacheContent = $cache->get unless $session{var}{adminOn};
|
||||
|
||||
my (@page_loop, $lastPage, %unfolded);
|
||||
tie %unfolded, "Tie::IxHash";
|
||||
|
||||
|
|
@ -242,22 +241,35 @@ sub build {
|
|||
WebGUI::ErrorHandler::warn("Error in WebGUI::Navigation::build while trying to execute $method".$@);
|
||||
}
|
||||
if (@pages) {
|
||||
my $startPageDepth = ($p->ancestors);
|
||||
my $startPageDepth = $p->get("depth")+1;
|
||||
my $maxDepth = $startPageDepth + $self->{_depth};
|
||||
my $minDepth = $startPageDepth - $self->{_depth};
|
||||
|
||||
foreach my $page (@pages) {
|
||||
my $pageData = {};
|
||||
$pageData->{"page.absDepth"} = $page->{'depth'} + 1;
|
||||
$pageData->{"page.isSystem"} = $page->{isSystem};
|
||||
|
||||
# Check if in depth range
|
||||
next if ($pageData->{"page.absDepth"} > $maxDepth || $pageData->{"page.absDepth"} < $minDepth);
|
||||
|
||||
# Check stopAtLevel
|
||||
next if ($pageData->{"page.absDepth"} < $self->{_stopAtLevel});
|
||||
|
||||
# Check showSystemPages
|
||||
next if (! $self->{_showSystemPages} && $pageData->{"page.isSystem"});
|
||||
|
||||
# Deal with hidden pages, don't ever hide pages if admin mode is on
|
||||
next if(($page->{'hideFromNavigation'} && ! $self->{_showHiddenPages}) && (! $session{var}{adminOn}));
|
||||
|
||||
# Initial page info
|
||||
$pageData->{"page.url"} = WebGUI::URL::gateway($page->{'urlizedTitle'});
|
||||
if ($page->{'encryptPage'}) {
|
||||
$pageData->{"page.url"} =~ s/http:/https:/;
|
||||
}
|
||||
$pageData->{"page.absDepth"} = $page->{'depth'} + 1;
|
||||
$pageData->{"page.relDepth"} = $pageData->{"page.absDepth"} - $startPageDepth;
|
||||
$pageData->{"page.isCurrent"} = ($page->{'pageId'} eq $session{page}{pageId});
|
||||
$pageData->{"page.isHidden"} = $page->{'hideFromNavigation'};
|
||||
$pageData->{"page.isSystem"} = $page->{isSystem};
|
||||
|
||||
# indent
|
||||
my $indent = 0;
|
||||
|
|
@ -278,18 +290,6 @@ sub build {
|
|||
push(@{$pageData->{"page.indent_loop"}},{'indent'=>$_}) for(1..$indent);
|
||||
$pageData->{"page.indent"} = " " x $indent;
|
||||
|
||||
# Check if in depth range
|
||||
next if ($pageData->{"page.absDepth"} > $maxDepth || $pageData->{"page.absDepth"} < $minDepth);
|
||||
|
||||
# Check stopAtLevel
|
||||
next if ($pageData->{"page.absDepth"} < $self->{_stopAtLevel});
|
||||
|
||||
# Check showSystemPages
|
||||
next if (! $self->{_showSystemPages} && $pageData->{"page.isSystem"});
|
||||
|
||||
# Deal with hidden pages, don't ever hide pages if admin mode is on
|
||||
next if(($page->{'hideFromNavigation'} && ! $self->{_showHiddenPages}) && (! $session{var}{adminOn}));
|
||||
|
||||
# Put page properties in $pageData hashref
|
||||
foreach my $property (@interestingPageProperties) {
|
||||
$pageData->{"page.".$property} = $page->{$property};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue