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.16 -r1.17 --- openacs-4/packages/acs-subsite/tcl/application-group-procs.tcl 27 Oct 2014 16:39:45 -0000 1.16 +++ openacs-4/packages/acs-subsite/tcl/application-group-procs.tcl 7 Aug 2017 23:47:58 -0000 1.17 @@ -90,15 +90,7 @@ # Check if the rel belongs to the application group, OR # the party *is* the application group. This proc considers the # application group to contain itself. - set found_p [db_string app_group_contains_rel_p { - select case when exists ( - select 1 - from application_group_element_map - where package_id = :package_id - and rel_id = :rel_id - ) then 1 else 0 end - from dual - }] + set found_p [db_string app_group_contains_rel_p {}] return $found_p } @@ -126,15 +118,7 @@ # Check if the party is a member of the application group, OR # the party *is* the application group. This proc considers the # applcation group to contain itself. - set found_p [db_string app_group_contains_segment_p { - select case when exists ( - select 1 - from application_group_segments - where package_id = :package_id - and segment_id = :segment_id - ) then 1 else 0 end - from dual - }] + set found_p [db_string app_group_contains_segment_p {}] return $found_p } @@ -150,30 +134,15 @@ empty string if the application group doesn't exist. } { - if {$no_complain_p} { - set no_complain_p t - } else { - set no_complain_p f - } - - if { [ad_conn isconnected] } { - if {$package_id eq ""} { + if { [ad_conn isconnected] && $package_id eq "" } { set package_id [ad_conn package_id] - } } if {$package_id eq ""} { error "application_group::group_id_from_package_id - no package_id specified." } - set group_id [db_exec_plsql application_group_from_package_id_query { - begin - :1 := application_group.group_id_from_package_id ( - package_id => :package_id, - no_complain_p => :no_complain_p - ); - end; - }] + set group_id [db_string application_group_from_package_id_query {}] return $group_id } @@ -374,3 +343,9 @@ } return $group_list } + +# Local variables: +# mode: tcl +# tcl-indent-level: 4 +# indent-tabs-mode: nil +# End: