added: Ability to enable / disable archiving per Collaboration System. fixed Mech tests again

This commit is contained in:
Doug Bell 2008-04-28 02:07:56 +00:00
parent 3316f2a0f4
commit aae6a32df4
6 changed files with 50 additions and 2 deletions

View file

@ -552,6 +552,13 @@ sub definition {
label=>$i18n->get('posts/page'),
hoverHelp=>$i18n->get('posts/page description'),
},
archiveEnabled => {
fieldType => "yesNo",
defaultValue => 1,
tab => 'properties',
label => $i18n->get('editForm archiveEnabled label'),
hoverHelp => $i18n->get('editForm archiveEnabled description'),
},
archiveAfter =>{
fieldType=>"interval",
defaultValue=>31536000,

View file

@ -74,6 +74,7 @@ sub execute {
while (my ($assetId) = $a->array) {
my $cs = WebGUI::Asset->new($self->session, $assetId, "WebGUI::Asset::Wobject::Collaboration");
next unless defined $cs;
next unless $cs->get("archiveEnabled");
my $archiveDate = $epoch - $cs->get("archiveAfter");
my $sql = "select asset.assetId, assetData.revisionDate from Post left join asset on asset.assetId=Post.assetId
left join assetData on Post.assetId=assetData.assetId and Post.revisionDate=assetData.revisionDate

View file

@ -1633,6 +1633,19 @@ the Collaboration Asset, the user will be notified.|,
message => q|Verify your humanity|,
lastUpdated => 1170543345,
},
'editForm archiveEnabled label' => {
message => q{Enable Archiving?},
lastUpdated => 0,
context => q{Label for asset property},
},
'editForm archiveEnabled description' => {
message => q{If Yes, Threads will be automatically hidden after a certain interval},
lastUpdated => 0,
context => q{Hover help for asset property},
},
};
1;