Index: openacs-4/packages/acs-subsite/tcl/application-group-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/tcl/application-group-procs.tcl,v diff -u -r1.2 -r1.3 --- openacs-4/packages/acs-subsite/tcl/application-group-procs.tcl 12 May 2002 20:57:02 -0000 1.2 +++ openacs-4/packages/acs-subsite/tcl/application-group-procs.tcl 17 May 2003 09:58:37 -0000 1.3 @@ -180,10 +180,8 @@ ad_proc new { { -group_id "" } { -group_type "application_group"} - { -parent_group_id "" } { -package_id "" } { -group_name "" } - { -context_id "" } { -creation_user "" } { -creation_ip "" } { -email "" } @@ -192,9 +190,6 @@ Creates an application group (i.e., group of "users/parties of this application") - NOTE: Doesn't deal with specializing membership and composition yet. - TO DO: Fix this. - Returns the group_id of the new application group. } { @@ -210,15 +205,6 @@ if { [empty_string_p $package_id] } { set package_id [ad_conn package_id] } - - if {[empty_string_p $parent_group_id]} { - # by default, this application group will be a subgroup - # of the first parent application group based on the site map. - - set parent_node_id [db_string parent_node_id ""] - - db_0or1row parent_group_id_query "" - } } if {[empty_string_p $package_id]} { @@ -234,48 +220,23 @@ append group_name " Parties" } - if {[empty_string_p $context_id]} { - set context_id $parent_group_id - } - db_transaction { - # creating the new group - set group_id [db_exec_plsql add_group { - begin - :1 := application_group.new ( - group_id => :group_id, - object_type => :group_type, - group_name => :group_name, - package_id => :package_id, - context_id => :context_id, - creation_user => :creation_user, - creation_ip => :creation_ip, - email => :email, - url => :url - ); - end; - }] - - if {![empty_string_p $parent_group_id]} { - - set rel_id [db_exec_plsql add_composition_rel { - begin - :1 := composition_rel.new ( - rel_type => 'composition_rel', - object_id_one => :parent_group_id, - object_id_two => :group_id, - creation_user => :creation_user, - creation_ip => :creation_ip - ); - end; - }] - - } + set group_id [db_exec_plsql add_group {}] } return $group_id } + + ad_proc delete { + -group_id:required + } { + Delete the given application group and all relational segments and constraints dependent + on it (handled by the PL/[pg]SQL API + } { + db_exec_plsql delete {} + } + }