Moving toolbar cache into the getToolbar sub. This was to be the forward port
of the getToolbar adminOn fix, but 7.6 already does uses adminOn to prevent extra output from being generated.
This commit is contained in:
parent
d27b5b0066
commit
3804ad7ddd
2 changed files with 6 additions and 5 deletions
|
|
@ -1,7 +1,8 @@
|
|||
7.6.9
|
||||
- fixed #9428: added code to ASSET::get to include keywords when no property name is requested
|
||||
- marked sbin scripts as executable
|
||||
- Problem #9492: in passing form variables to Macro SQL inside a snippet
|
||||
- fixed #9492: Problem in passing form variables to Macro SQL inside a snippet
|
||||
- fixed #9404: Head tags for admin user with admin mode off
|
||||
|
||||
7.6.8
|
||||
- added #!/usr/bin/env perl to all utility scripts
|
||||
|
|
|
|||
|
|
@ -1333,7 +1333,7 @@ Returns a toolbar with a set of icons that hyperlink to functions that delete, e
|
|||
|
||||
sub getToolbar {
|
||||
my $self = shift;
|
||||
return undef unless $self->canEdit;
|
||||
return undef unless $self->canEdit && $self->session->var->isAdminOn;
|
||||
return $self->{_toolbar}
|
||||
if (exists $self->{_toolbar});
|
||||
my $userUiLevel = $self->session->user->profileField("uiLevel");
|
||||
|
|
@ -1432,6 +1432,7 @@ sub getToolbar {
|
|||
. $self->getUrl("op=assetManager") . '">' . $i18n->get("manage") . '</a></li>';
|
||||
}
|
||||
$output .= '</ul></div></div>' . $toolbar . '</div>';
|
||||
$self->{_toolbar} = $output;
|
||||
return $output;
|
||||
}
|
||||
|
||||
|
|
@ -1988,9 +1989,8 @@ Executes what is necessary to make the view() method work with content chunking.
|
|||
|
||||
sub prepareView {
|
||||
my $self = shift;
|
||||
if ($self->session->var->isAdminOn) {
|
||||
$self->{_toolbar} = $self->getToolbar;
|
||||
}
|
||||
##Make the toolbar now and stick it in the cache.
|
||||
$self->getToolbar;
|
||||
my $style = $self->session->style;
|
||||
my @keywords = @{WebGUI::Keyword->new($self->session)->getKeywordsForAsset({asset=>$self, asArrayRef=>1})};
|
||||
if (scalar @keywords) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue