Forward porting viewing pending assets in the trash and clipboard. Also

allowing restore of pending assets in the trash.
This commit is contained in:
Colin Kuskie 2009-08-06 17:56:56 +00:00
parent 7fcd0db05d
commit 0bfc16bf9a
3 changed files with 12 additions and 3 deletions

View file

@ -1,5 +1,6 @@
7.7.17
- fixed #10724: gotcha.txt for 7.7.17 enhanced
- fixed #10316: Cannot view pending version tags
- fixed #10667: cannot change size of template editor
- fixed #10654: Story Archive: Search not working properly
- fixed #10692: Unprivileged users can stop spectre

View file

@ -311,12 +311,20 @@ sub checkView {
return "chunked";
}
elsif ($var->isAdminOn && $self->get("state") =~ /^trash/) { # show em trash
$http->setRedirect($self->getUrl("func=manageTrash"));
my $queryFrag = "func=manageTrash";
if ($self->session->form->process('revision')) {
$queryFrag .= ";revision=".$self->session->form->process('revision');
}
$http->setRedirect($self->getUrl($queryFrag));
$http->sendHeader;
return "chunked";
}
elsif ($var->isAdminOn && $self->get("state") =~ /^clipboard/) { # show em clipboard
$http->setRedirect($self->getUrl("func=manageClipboard"));
my $queryFrag = "func=manageTrash";
if ($self->session->form->process('revision')) {
$queryFrag .= ";revision=".$self->session->form->process('revision');
}
$http->setRedirect($self->getUrl($queryFrag));
$http->sendHeader;
return "chunked";
}

View file

@ -473,7 +473,7 @@ Restores a piece of content from the trash back to it's original location.
sub www_restoreList {
my $self = shift;
foreach my $id ($self->session->form->param("assetId")) {
my $asset = WebGUI::Asset->newByDynamicClass($self->session,$id);
my $asset = eval { WebGUI::Asset->newPending($self->session,$id); };
$asset->publish if $asset->canEdit;
}
if ($self->session->form->process("proceed") ne "") {