Index: openacs-4/packages/acs-authentication/tcl/authentication-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-authentication/tcl/authentication-procs.tcl,v diff -u -r1.114.2.9 -r1.114.2.10 --- openacs-4/packages/acs-authentication/tcl/authentication-procs.tcl 1 Sep 2020 17:09:32 -0000 1.114.2.9 +++ openacs-4/packages/acs-authentication/tcl/authentication-procs.tcl 3 Sep 2020 09:16:41 -0000 1.114.2.10 @@ -1766,20 +1766,22 @@ # Is there a user from other authorities having swa admins (having # admin rights on the magic object 'security_context_root')? # - return [db_string admins_left_p { - select case when exists (select 1 - from acs_permissions p, + return [db_0or1row admins_left_p { + select 1 from dual where exists + ( + select 1 + from acs_permissions p, party_approved_member_map m, acs_magic_objects amo, cc_users u - where amo.name = 'security_context_root' - and p.object_id = amo.object_id - and p.grantee_id = m.party_id - and u.user_id = m.member_id - and u.member_state = 'approved' - and u.authority_id <> :authority_id - and acs_permission.permission_p(amo.object_id, u.user_id, 'admin')) then 1 else 0 end - from dual + where amo.name = 'security_context_root' + and p.object_id = amo.object_id + and p.grantee_id = m.party_id + and u.user_id = m.member_id + and u.member_state = 'approved' + and u.authority_id <> :authority_id + and acs_permission.permission_p(amo.object_id, u.user_id, 'admin') + ) }] } Index: openacs-4/packages/acs-subsite/tcl/attribute-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/tcl/attribute-procs.tcl,v diff -u -r1.20.2.5 -r1.20.2.6 --- openacs-4/packages/acs-subsite/tcl/attribute-procs.tcl 1 Sep 2020 17:41:50 -0000 1.20.2.5 +++ openacs-4/packages/acs-subsite/tcl/attribute-procs.tcl 3 Sep 2020 09:16:41 -0000 1.20.2.6 @@ -17,14 +17,12 @@ @creation-date 12/30/2000 } { - set dynamic_p [db_string attribute_for_dynamic_object_p { - select case when exists + set dynamic_p [db_0or1row attribute_for_dynamic_object_p { + select 1 from dual where exists (select 1 from acs_attributes a, acs_object_types t where t.dynamic_p = 't' and a.object_type = t.object_type and a.attribute_id = :value) - then 1 else 0 end - from dual }] if {!$dynamic_p} { ad_complain "Attribute does not belong to a dynamic object and cannot be modified" Index: openacs-4/packages/dotlrn/tcl/test/community-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/tcl/test/community-procs.tcl,v diff -u -r1.5.2.5 -r1.5.2.6 --- openacs-4/packages/dotlrn/tcl/test/community-procs.tcl 1 Sep 2020 17:16:11 -0000 1.5.2.5 +++ openacs-4/packages/dotlrn/tcl/test/community-procs.tcl 3 Sep 2020 09:16:42 -0000 1.5.2.6 @@ -35,13 +35,15 @@ communities_security_inherit { Test permission settings of all communities } { - aa_false "Communities inherit permissions (high probability of security risk)" [db_string get_communities_with_inherit { - select case when exists (select 1 - from dotlrn_communities_all c, acs_objects o - where c.community_id = o.object_id - and o.security_inherit_p = 't') then 1 else 0 end - from dual - }] + aa_false "Communities inherit permissions (high probability of security risk)" \ + [db_0or1row get_communities_with_inherit { + select 1 from dual where exists + ( + select 1 from dotlrn_communities_all c, acs_objects o + where c.community_id = o.object_id + and o.security_inherit_p = 't' + ) + }] } # Local variables: Index: openacs-4/packages/new-portal/tcl/portal-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/new-portal/tcl/portal-procs.tcl,v diff -u -r1.216.2.7 -r1.216.2.8 --- openacs-4/packages/new-portal/tcl/portal-procs.tcl 1 Sep 2020 17:24:47 -0000 1.216.2.7 +++ openacs-4/packages/new-portal/tcl/portal-procs.tcl 3 Sep 2020 09:16:42 -0000 1.216.2.8 @@ -2489,15 +2489,15 @@ } { set ds_id [get_datasource_id $portlet_name] - return [db_string portlet_visible { - select case when exists (select 1 - from portal_element_map, - portal_pages - where portal_pages.portal_id = :portal_id - and portal_element_map.datasource_id = :ds_id - and portal_element_map.page_id = portal_pages.page_id - and portal_element_map.state <> 'hidden') then 1 else 0 end - from dual + return [db_0or1row portlet_visible { + select 1 from dual where exists + ( + select 1 from portal_element_map,portal_pages + where portal_pages.portal_id = :portal_id + and portal_element_map.datasource_id = :ds_id + and portal_element_map.page_id = portal_pages.page_id + and portal_element_map.state <> 'hidden' + ) }] }