- Any attempt to view "root" will redirect the user to the default page.

- fix [ 1285604 ] getVars undefined in Asset::File.pm
 - fix [ 1284330 ] error in page export function
 - Fixed a trash purging problem.
 - fix [ 1281516 ] Undefined subroutine &WebGUI::Asset::File::quote runHourly
 - fix [ 1281430 ] www_restoreList should be in AssetTrash.pm
This commit is contained in:
JT Smith 2005-09-09 23:07:34 +00:00
parent 8f71e237c1
commit 637bd165ba
38 changed files with 53 additions and 4190 deletions

View file

@ -174,25 +174,6 @@ sub www_deleteList {
}
#-------------------------------------------------------------------
=head2 www_emptyTrash ( )
Calls the purgeTree() method to delete all items in Trash. Returns the www_manageTrash() method. If isInGroup(4) returns false, renders insufficient privilege page.
=cut
sub www_emptyTrash {
my $self = shift;
my $ac = WebGUI::AdminConsole->new("trash");
return WebGUI::Privilege::insufficient() unless (WebGUI::Grouping::isInGroup(4));
foreach my $asset (@{$self->getAssetsInTrash(!($session{form}{systemTrash} && WebGUI::Grouping::isInGroup(3)))}) {
$asset->purgeTree;
}
return $self->www_manageTrash();
}
#-------------------------------------------------------------------
=head2 www_manageTrash ( )
@ -253,6 +234,28 @@ sub www_manageTrash {
return $ac->render($output, $header);
}
#-------------------------------------------------------------------
=head2 www_restoreList ( )
Restores a piece of content from the trash back to it's original location.
=cut
sub www_restoreList {
my $self = shift;
return WebGUI::Privilege::insufficient() unless $self->canEdit;
foreach my $id ($session{cgi}->param("assetId")) {
my $asset = WebGUI::Asset->newByDynamicClass($id);
$asset->publish;
}
if ($session{form}{proceed} ne "") {
my $method = "www_".$session{form}{proceed};
return $self->$method();
}
return $self->www_manageTrash();
}
1;