article forum migration complete

This commit is contained in:
JT Smith 2005-02-12 21:18:23 +00:00
parent e6ca0fa19e
commit 949ea2d6cf
5 changed files with 279 additions and 17 deletions

View file

@ -1848,14 +1848,6 @@ sub purge {
}
WebGUI::SQL->write("delete from metaData_values where assetId = ".quote($self->getId));
WebGUI::SQL->commit;
# eliminate anything bound to this asset
my $sth = WebGUI::SQL->read("select assetId,className from asset where boundToId=".quote($self->getId));
while (my ($id, $class) = $sth->array) {
my $asset = WebGUI::Asset->newByDynamicClass($id,$class);
if (defined $asset) {
$asset->purgeTree;
}
}
$self = undef;
return 1;
}

View file

@ -42,10 +42,10 @@ sub createSubscriptionGroup {
my $self = shift;
my $group = WebGUI::Group->new("new");
$group->name($self->getId);
$group->description("The group to store subscriptions for the collaboration system ".$self->getId);
$group->description("The group to store subscriptions for the thread ".$self->getId);
$group->isEditable(0);
$group->showInForms(0);
$group->deleteGroups([3]); # admins don't want to be auto subscribed to this thing
$group->deleteGroups(['3']); # admins don't want to be auto subscribed to this thing
$self->update({
subscriptionGroupId=>$group->groupId
});

View file

@ -56,7 +56,9 @@ This package provides an object-oriented way of managing WebGUI groups and group
$g->addGroups(\@arr);
$g->addUsers(\@arr);
$g->deleteGroups(\@arr);
$g->deleteUsers(\@arr);
$g->delete;
=head1 METHODS
@ -93,6 +95,22 @@ sub addGroups {
#-------------------------------------------------------------------
=head2 addUsers ( users )
Adds users to this group.
=head3 users
An array reference containing the list of user ids to add to this group.
=cut
sub addUsers {
WebGUI::Grouping::addUsersToGroups($_[1],[$_[0]->{_groupId}]);
}
#-------------------------------------------------------------------
=head2 autoAdd ( [ value ] )
Returns an boolean stating whether users can add themselves to this group.
@ -184,6 +202,22 @@ sub deleteGroups {
WebGUI::Grouping::deleteGroupsFromGroups($_[1],[$_[0]->{_groupId}]);
}
#-------------------------------------------------------------------
=head2 deleteUsers ( users )
Deletes users from this group.
=head3 users
An array reference containing the list of user ids to delete from this group.
=cut
sub deleteUsers {
WebGUI::Grouping::deleteUsersFromGroups($_[1],[$_[0]->{_groupId}]);
}
#-------------------------------------------------------------------