Pasting from the AdminBar in the AssetManager should leave you in the manager.

This commit is contained in:
Colin Kuskie 2009-06-17 15:38:08 +00:00
parent 65bdea5f3c
commit 4320d39b1c
2 changed files with 16 additions and 7 deletions

View file

@ -10,6 +10,7 @@
- fixed bug in Thingy where the style template would not be processed after
editing a Thing and the 'return after edit' setting was set to 'Thing
Default' ( Martin Kamerbeek / Oqapi )
- fixed: In the Asset Manager, if you pasted an asset if returned you to the page instead the manager.
7.7.10
- Made a change to LDAP auth that adds an OR to that query so that it also searches for a row with fieldData REGEXP '^uid=(value-from-ldap-directory-server),'. (Wes Morgan)

View file

@ -489,7 +489,7 @@ sub www_paste {
return $session->privilege->insufficient() unless $self->canEdit;
my $pasteAssetId = $session->form->process('assetId');
my $pasteAsset = WebGUI::Asset->newPending($session, $pasteAssetId);
return $session->privilege->insufficient() unless $pasteAsset->canEdit;
return $session->privilege->insufficient() unless $pasteAsset && $pasteAsset->canEdit;
$self->paste($pasteAssetId);
return "";
}
@ -498,19 +498,27 @@ sub www_paste {
=head2 www_pasteList ( )
Returns a www_manageAssets() method. Pastes a selection of assets. If canEdit is False, returns an insufficient privileges page.
Pastes a selection of assets. If canEdit is False, returns an insufficient privileges page.
Returns the user to the manageAssets screen.
=cut
sub www_pasteList {
my $self = shift;
return $self->session->privilege->insufficient() unless $self->canEdit;
ASSET: foreach my $clipId ($self->session->form->param("assetId")) {
my $pasteAsset = WebGUI::Asset->newPending($self->session, $clipId);
my $self = shift;
my $session = $self->session;
return $session->privilege->insufficient() unless $self->canEdit;
my $form = $session->form;
ASSET: foreach my $clipId ($form->param("assetId")) {
my $pasteAsset = WebGUI::Asset->newPending($session, $clipId);
next ASSET unless $pasteAsset->canEdit;
$self->paste($clipId);
}
return $self->www_manageAssets();
if ($form->param("proceed") eq 'manageAssets') {
return $self->www_manageAssets();
}
else {
return "";
}
}