Feature Request 848832 - Show hidden pages when admin mode is on
This commit is contained in:
parent
3944ba6e99
commit
34bb2caa53
1 changed files with 6 additions and 6 deletions
|
|
@ -224,7 +224,7 @@ sub build {
|
||||||
my $method = $self->_methods()->{$self->{_method}}{method};
|
my $method = $self->_methods()->{$self->{_method}}{method};
|
||||||
|
|
||||||
my $cache = WebGUI::Cache->new($self->{_identifier}.'-'.$session{page}{pageId}, "Navigation-".$session{config}{configFile});
|
my $cache = WebGUI::Cache->new($self->{_identifier}.'-'.$session{page}{pageId}, "Navigation-".$session{config}{configFile});
|
||||||
my $cacheContent = $cache->get;
|
my $cacheContent = $cache->get unless $session{var}{adminOn};
|
||||||
|
|
||||||
my (@page_loop, $lastPage, %unfolded);
|
my (@page_loop, $lastPage, %unfolded);
|
||||||
tie %unfolded, "Tie::IxHash";
|
tie %unfolded, "Tie::IxHash";
|
||||||
|
|
@ -234,8 +234,8 @@ sub build {
|
||||||
foreach my $property (@interestingPageProperties) {
|
foreach my $property (@interestingPageProperties) {
|
||||||
$var->{'page.current.'.$property} = $currentPage->get($property);
|
$var->{'page.current.'.$property} = $currentPage->get($property);
|
||||||
}
|
}
|
||||||
unless (defined $cacheContent &&
|
unless (defined $cacheContent &&
|
||||||
! $session{url}{siteURL}) { # Never use cache if an alternate site url is specified.
|
! $session{url}{siteURL}) { # Never use cache if an alternate site url is specified.
|
||||||
# The loop was not cached
|
# The loop was not cached
|
||||||
my @pages = eval $method;
|
my @pages = eval $method;
|
||||||
if ($@) {
|
if ($@) {
|
||||||
|
|
@ -289,8 +289,8 @@ sub build {
|
||||||
# Check showSystemPages
|
# Check showSystemPages
|
||||||
next if (! $self->{_showSystemPages} && $pageData->{"page.isSystem"});
|
next if (! $self->{_showSystemPages} && $pageData->{"page.isSystem"});
|
||||||
|
|
||||||
# Deal with hidden pages
|
# Deal with hidden pages, don't ever hide pages if admin mode is on
|
||||||
next if($page->{'hideFromNavigation'} && ! $self->{_showHiddenPages});
|
next if(($page->{'hideFromNavigation'} && ! $self->{_showHiddenPages}) && (! $session{var}{adminOn}));
|
||||||
|
|
||||||
# Put page properties in $pageData hashref
|
# Put page properties in $pageData hashref
|
||||||
foreach my $property (@interestingPageProperties) {
|
foreach my $property (@interestingPageProperties) {
|
||||||
|
|
@ -347,7 +347,7 @@ sub build {
|
||||||
}
|
}
|
||||||
|
|
||||||
# We had a cache miss, so let's put the data in cache
|
# We had a cache miss, so let's put the data in cache
|
||||||
$cache->set(\@page_loop, 3600*24);
|
$cache->set(\@page_loop, 3600*24) unless $session{var}{adminOn};
|
||||||
} else {
|
} else {
|
||||||
# We had a cache hit
|
# We had a cache hit
|
||||||
@page_loop = @{$cacheContent};
|
@page_loop = @{$cacheContent};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue