From 73dcd7729aa6b464f27134ab693e5986633eb204 Mon Sep 17 00:00:00 2001 From: JT Smith Date: Tue, 28 Feb 2006 21:39:24 +0000 Subject: [PATCH] readded purge option to the trash --- docs/changelog/6.x.x.txt | 1 + lib/WebGUI/AssetTrash.pm | 28 +++++++++++++++++++++++++++- lib/WebGUI/i18n/English/Asset.pm | 6 ++++++ 3 files changed, 34 insertions(+), 1 deletion(-) diff --git a/docs/changelog/6.x.x.txt b/docs/changelog/6.x.x.txt index 1a9fca980..bc19d636b 100644 --- a/docs/changelog/6.x.x.txt +++ b/docs/changelog/6.x.x.txt @@ -1,4 +1,5 @@ 6.99.0 + - Readded the purge option to the trash manager. - Added archive/unarchive options to CS threads. - Added a database cache option as an alternative to memcached. - Added a workflow system. diff --git a/lib/WebGUI/AssetTrash.pm b/lib/WebGUI/AssetTrash.pm index 2e774c185..bec8db5ed 100644 --- a/lib/WebGUI/AssetTrash.pm +++ b/lib/WebGUI/AssetTrash.pm @@ -204,6 +204,7 @@ sub www_manageTrash { $self->session->style->setScript($self->session->config->get("extrasURL").'/assetManager/assetManager.js', {type=>"text/javascript"}); my $output = "
 
'; return $ac->render($output, $header); } #------------------------------------------------------------------- +=head2 www_purgeList ( ) + +Purges a piece of content, including all it's revisions, from the system permanently. + +=cut + +sub www_purgeList { + my $self = shift; + return $self->session->privilege->insufficient() unless $self->canEdit; + foreach my $id ($self->session->form->param("assetId")) { + my $asset = WebGUI::Asset->newByDynamicClass($self->session,$id); + $asset->purge; + } + if ($self->session->form->process("proceed") ne "") { + my $method = "www_".$self->session->form->process("proceed"); + return $self->$method(); + } + return $self->www_manageTrash(); +} + +#------------------------------------------------------------------- + =head2 www_restoreList ( ) Restores a piece of content from the trash back to it's original location. diff --git a/lib/WebGUI/i18n/English/Asset.pm b/lib/WebGUI/i18n/English/Asset.pm index c5b77a162..6b4339bb6 100644 --- a/lib/WebGUI/i18n/English/Asset.pm +++ b/lib/WebGUI/i18n/English/Asset.pm @@ -32,6 +32,12 @@ do a commit immediately after an edit occurs.|, context => q|Hover help for the toggle for asset versioning.| }, + 'purge' => { + message => q|Purge|, + lastUpdated => 0, + context => q|The label for the purge button in the trash manager.| + }, + 'set tag' => { message => q|Set As Working Tag|, lastUpdated => 0,