Final state and status fixes.
In these three files, any check for status=archived was removed, since in each case it is possible that the Asset may want to be viewable when it is archived, like Files, Posts, etc. Updated Session/Url.t to remove tests for status=archived.
This commit is contained in:
parent
865c1d315b
commit
256b52a0d7
4 changed files with 22 additions and 19 deletions
|
|
@ -470,16 +470,15 @@ sub www_view {
|
|||
return $self->session->privilege->noAccess() unless $self->canView;
|
||||
|
||||
# Check to make sure it's not in the trash or some other weird place
|
||||
my $state = $self->get("state");
|
||||
if ($state ne "published" && $state ne "archived") {
|
||||
if ($self->get("state") ne "published") {
|
||||
my $i18n = WebGUI::International->new($self->session,'Asset_File');
|
||||
$self->session->http->setStatus("404");
|
||||
return sprintf($i18n->get("file not found"), $self->getUrl());
|
||||
}
|
||||
|
||||
$self->session->http->setRedirect($self->getFileUrl);
|
||||
$self->session->http->setStreamedFile($self->getStorageLocation->getPath($self->get("filename")));
|
||||
return 'chunked';
|
||||
$self->session->http->setRedirect($self->getFileUrl);
|
||||
$self->session->http->setStreamedFile($self->getStorageLocation->getPath($self->get("filename")));
|
||||
return 'chunked';
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue