don't need/want chunking on dashboard asset
This commit is contained in:
parent
742efc3a60
commit
cffe57f0a8
2 changed files with 25 additions and 26 deletions
|
|
@ -566,7 +566,7 @@ sub www_edit {
|
||||||
|
|
||||||
#-------------------------------------------------------------------
|
#-------------------------------------------------------------------
|
||||||
|
|
||||||
=head2 www_view ( [ disableCache ] )
|
=head2 www_view ( )
|
||||||
|
|
||||||
Renders self->view based upon current style, subject to timeouts. Returns Privilege::noAccess() if canView is False.
|
Renders self->view based upon current style, subject to timeouts. Returns Privilege::noAccess() if canView is False.
|
||||||
|
|
||||||
|
|
@ -588,10 +588,11 @@ sub www_view {
|
||||||
return WebGUI::Asset->getNotFound($self->session)->www_view;
|
return WebGUI::Asset->getNotFound($self->session)->www_view;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ($self->get("encryptPage") && $self->session->env->get("HTTPS") ne "on") {
|
# causes problems with the wre so it's commented out
|
||||||
$self->session->http->setRedirect($self->getUrl);
|
# if ($self->get("encryptPage") && $self->session->env->get("HTTPS") ne "on") {
|
||||||
return "";
|
# $self->session->http->setRedirect($self->getUrl);
|
||||||
}
|
# return "";
|
||||||
|
# }
|
||||||
$self->logView();
|
$self->logView();
|
||||||
# must find a way to do this next line better
|
# must find a way to do this next line better
|
||||||
$self->session->http->setCookie("wgSession",$self->session->var->{_var}{sessionId}) unless $self->session->var->{_var}{sessionId} eq $self->session->http->getCookies->{"wgSession"};
|
$self->session->http->setCookie("wgSession",$self->session->var->{_var}{sessionId}) unless $self->session->var->{_var}{sessionId} eq $self->session->http->getCookies->{"wgSession"};
|
||||||
|
|
|
||||||
|
|
@ -156,22 +156,6 @@ sub isManaging {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#-------------------------------------------------------------------
|
|
||||||
|
|
||||||
=head2 prepareView ( )
|
|
||||||
|
|
||||||
See WebGUI::Asset::prepareView() for details.
|
|
||||||
|
|
||||||
=cut
|
|
||||||
|
|
||||||
sub prepareView {
|
|
||||||
my $self = shift;
|
|
||||||
$self->SUPER::prepareView();
|
|
||||||
my $template = WebGUI::Asset::Template->new($self->session, $self->get("templateId"));
|
|
||||||
$template->prepare;
|
|
||||||
$self->{_viewTemplate} = $template;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#-------------------------------------------------------------------
|
#-------------------------------------------------------------------
|
||||||
sub processPropertiesFromFormPost {
|
sub processPropertiesFromFormPost {
|
||||||
|
|
@ -301,18 +285,32 @@ sub www_setContentPositions {
|
||||||
|
|
||||||
#-------------------------------------------------------------------
|
#-------------------------------------------------------------------
|
||||||
|
|
||||||
=head2 www_view ( )
|
=head2 www_view ( )
|
||||||
|
|
||||||
Returns the view() method of the asset object if the requestor canView.
|
Renders self->view based upon current style, subject to timeouts. Returns Privilege::noAccess() if canView is False.
|
||||||
|
|
||||||
=cut
|
=cut
|
||||||
|
|
||||||
sub www_view {
|
sub www_view {
|
||||||
my $self = shift;
|
my $self = shift;
|
||||||
return $self->SUPER::www_view(1);
|
unless ($self->canView) {
|
||||||
|
if ($self->get("state") eq "published") { # no privileges, make em log in
|
||||||
|
return $self->session->privilege->noAccess();
|
||||||
|
} elsif ($self->session->var->get("adminOn") && $self->get("state") =~ /^trash/) { # show em trash
|
||||||
|
$self->session->http->setRedirect($self->getUrl("func=manageTrash"));
|
||||||
|
return "";
|
||||||
|
} elsif ($self->session->var->get("adminOn") && $self->get("state") =~ /^clipboard/) { # show em clipboard
|
||||||
|
$self->session->http->setRedirect($self->getUrl("func=manageClipboard"));
|
||||||
|
return "";
|
||||||
|
} else { # tell em it doesn't exist anymore
|
||||||
|
$self->session->http->setStatus("410");
|
||||||
|
return WebGUI::Asset->getNotFound($self->session)->www_view;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$self->logView();
|
||||||
|
my $style = $self->processStyle($self->view);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
1;
|
1;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue