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.20 -r1.21 --- openacs-4/packages/acs-subsite/tcl/application-group-procs.tcl 17 Sep 2018 14:01:24 -0000 1.20 +++ openacs-4/packages/acs-subsite/tcl/application-group-procs.tcl 17 Sep 2018 14:02:39 -0000 1.21 @@ -17,10 +17,10 @@ { -party_id "" } -include_self:boolean } { - Determines whether the party in question (identified by party_id) is + Determines whether the party in question (identified by party_id) is contained by the application group identified by package_id. - If package_id is not specified, and we have a connection, then the - proc will grab the package_id of the current package (i.e., + If package_id is not specified, and we have a connection, then the + proc will grab the package_id of the current package (i.e., [ad_conn package_id]). } { @@ -72,10 +72,10 @@ { -package_id "" } { -rel_id "" } } { - Determines whether the relation in question (identified by rel_id) is + Determines whether the relation in question (identified by rel_id) is contained by the application group identified by package_id. - If package_id is not specified, and we have a connection, then the - proc will grab the package_id of the current package (i.e., + If package_id is not specified, and we have a connection, then the + proc will grab the package_id of the current package (i.e., [ad_conn package_id]). } { @@ -99,10 +99,10 @@ { -package_id "" } { -segment_id "" } } { - Determines whether the segment in question (identified by segment_id) + Determines whether the segment in question (identified by segment_id) "belongs" to the application group identified by package_id. - If package_id is not specified, and we have a connection, then the - proc will grab the package_id of the current package (i.e., + If package_id is not specified, and we have a connection, then the + proc will grab the package_id of the current package (i.e., [ad_conn package_id]). } { @@ -135,7 +135,7 @@ } { if { [ad_conn isconnected] && $package_id eq "" } { - set package_id [ad_conn package_id] + set package_id [ad_conn package_id] } if {$package_id eq ""} { @@ -158,7 +158,7 @@ } ad_proc -public application_group::new { - { -group_id "" } + { -group_id "" } { -group_type "application_group"} { -package_id "" } { -group_name "" } @@ -167,7 +167,7 @@ { -email "" } { -url "" } } { - Creates an application group + Creates an application group (i.e., group of "users/parties of this application") Returns the group_id of the new application group. @@ -177,13 +177,13 @@ # Since we have a connection, default user_id / peeraddr # if they're not specified if { $creation_user eq "" } { - set creation_user [ad_conn user_id] + set creation_user [ad_conn user_id] } if { $creation_ip eq "" } { - set creation_ip [ad_conn peeraddr] + set creation_ip [ad_conn peeraddr] } if { $package_id eq "" } { - set package_id [ad_conn package_id] + set package_id [ad_conn package_id] } } @@ -193,9 +193,9 @@ if {$group_name eq ""} { set group_name [db_string group_name_query { - select substr(instance_name, 1, 90) - from apm_packages - where package_id = :package_id + select substr(instance_name, 1, 90) + from apm_packages + where package_id = :package_id }] append group_name " Parties" } @@ -235,13 +235,13 @@ {-include_self:boolean} } { Starting with the node of the given id, or at given url, - climb up the site map and return the node of the first + climb up the site map and return the node of the first non null application group - @param url The url of the node to start from. You must provide - either url or node_id. An empty url is taken to mean + @param url The url of the node to start from. You must provide + either url or node_id. An empty url is taken to mean the main site. - @param node_id The id of the node to start from. Takes precedence + @param node_id The id of the node to start from. Takes precedence over any provided url. @param include_self If true, include the current package in the search @@ -260,7 +260,7 @@ set group_id "" while {$group_id eq "" && $url ne ""} { - + if { $include_self_p } { array set node_array [site_node::get -url $url] set group_id [application_group::group_id_from_package_id \ @@ -275,7 +275,7 @@ set url [string range $url 0 [string last / $url]] } if {$group_id eq ""} { - array unset -no_complain node_array + array unset -no_complain node_array } set node_array(application_group_id) $group_id @@ -327,7 +327,7 @@ -node_id $node_id \ -element application_group_id] } - + ad_proc -public application_group::child_application_groups { -node_id:required {-package_key ""} @@ -337,9 +337,9 @@ set group_list [list] set child_packages [site_node::get_children -package_key $package_key -node_id $node_id -element package_id] foreach package_id $child_packages { - if {[set group_id [application_group::group_id_from_package_id -package_id ${package_id} -no_complain]] ne ""} { - lappend group_list $group_id - } + if {[set group_id [application_group::group_id_from_package_id -package_id ${package_id} -no_complain]] ne ""} { + lappend group_list $group_id + } } return $group_list }