Index: openacs-4/packages/acs-subsite/www/admin/groups/new.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/www/admin/groups/new.tcl,v diff -u -r1.10 -r1.11 --- openacs-4/packages/acs-subsite/www/admin/groups/new.tcl 13 Jun 2015 23:59:10 -0000 1.10 +++ openacs-4/packages/acs-subsite/www/admin/groups/new.tcl 7 Aug 2017 23:47:58 -0000 1.11 @@ -15,7 +15,7 @@ { group_id:naturalnum "" } {add_to_group_id:integer ""} {add_with_rel_type "composition_rel"} - { return_url "" } + { return_url:localurl "" } {group_rel_type_list ""} } -properties { context:onevalue @@ -45,16 +45,7 @@ } # We assume the group is on side 1... -db_1row rel_type_info { - select object_type as ancestor_rel_type - from acs_object_types - where supertype = 'relationship' - and object_type in ( - select object_type from acs_object_types - start with object_type = :add_with_rel_type - connect by object_type = prior supertype - ) -} +db_1row rel_type_info {} set create_p [group::permission_p -privilege create $add_to_group_id] @@ -134,12 +125,20 @@ if { [template::form is_valid add_group] } { db_transaction { - group::new -form_id add_group -variable_prefix group -group_id $group_id -context_id [ad_conn package_id] $group_type - relation_add -member_state $member_state $add_with_rel_type $add_to_group_id $group_id + set group_id [group::new \ + -form_id add_group \ + -variable_prefix group \ + -group_id $group_id \ + -context_id [ad_conn package_id] \ + $group_type] + relation_add -member_state $member_state $add_with_rel_type $add_to_group_id $group_id } - # there may be more segments to put this new group in before the - # user's original request is complete. So build a return_url stack + # + # There may be more segments to put this new group in before the + # user's original request is complete. So build a return_url + # stack. + # set package_url [ad_conn package_url] foreach group_rel_type $group_rel_type_list { @@ -165,3 +164,9 @@ ad_return_template + +# Local variables: +# mode: tcl +# tcl-indent-level: 4 +# indent-tabs-mode: nil +# End: