Index: openacs-4/packages/acs-service-contract/tcl/acs-service-contract-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-service-contract/tcl/acs-service-contract-procs.tcl,v diff -u -r1.33.2.2 -r1.33.2.3 --- openacs-4/packages/acs-service-contract/tcl/acs-service-contract-procs.tcl 2 Jan 2020 18:55:57 -0000 1.33.2.2 +++ openacs-4/packages/acs-service-contract/tcl/acs-service-contract-procs.tcl 1 Sep 2020 17:37:10 -0000 1.33.2.3 @@ -91,14 +91,16 @@ @author Neophytos Demetriou } { return [db_string binding_exists_p { - select exists (select 1 from acs_sc_bindings - where contract_id = (select contract_id - from acs_sc_contracts - where contract_name = :contract) - and impl_id = (select impl_id - from acs_sc_impls - where impl_name = :impl - and impl_contract_name = :contract)) + select case when exists + (select 1 from acs_sc_bindings + where contract_id = (select contract_id + from acs_sc_contracts + where contract_name = :contract) + and impl_id = (select impl_id + from acs_sc_impls + where impl_name = :impl + and impl_contract_name = :contract)) + then 1 else 0 end from dual }] } 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.4 -r1.20.2.5 --- openacs-4/packages/acs-subsite/tcl/attribute-procs.tcl 3 Jul 2020 07:43:20 -0000 1.20.2.4 +++ openacs-4/packages/acs-subsite/tcl/attribute-procs.tcl 1 Sep 2020 17:41:50 -0000 1.20.2.5 @@ -18,10 +18,12 @@ } { set dynamic_p [db_string attribute_for_dynamic_object_p { - select 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) + select case when 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} { Index: openacs-4/packages/acs-subsite/tcl/group-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/tcl/group-procs.tcl,v diff -u -r1.60.2.11 -r1.60.2.12 --- openacs-4/packages/acs-subsite/tcl/group-procs.tcl 1 Sep 2020 14:32:30 -0000 1.60.2.11 +++ openacs-4/packages/acs-subsite/tcl/group-procs.tcl 1 Sep 2020 17:43:50 -0000 1.60.2.12 @@ -699,9 +699,11 @@ # will be there for both their roles of member and # administrator). set result [db_0or1row party_is_member { - select exists (select 1 from group_approved_member_map - where member_id = :party_id - and group_id = :group_id) + select case when exists + (select 1 from group_approved_member_map + where member_id = :party_id + and group_id = :group_id) + then 1 else 0 end from dual }] } Index: openacs-4/packages/acs-subsite/tcl/group-type-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/tcl/group-type-procs.tcl,v diff -u -r1.12.2.3 -r1.12.2.4 --- openacs-4/packages/acs-subsite/tcl/group-type-procs.tcl 3 Mar 2020 18:38:15 -0000 1.12.2.3 +++ openacs-4/packages/acs-subsite/tcl/group-type-procs.tcl 1 Sep 2020 17:38:56 -0000 1.12.2.4 @@ -30,10 +30,12 @@ set user_id [ad_conn user_id] } return [db_string group_exists_p { - select exists (select 1 from acs_objects o - where object_type = :group_type - and not acs_permission.permission_p(o.object_id, :user_id, 'delete')) - from dual + select case when exists + (select 1 from acs_objects o + where object_type = :group_type + and not acs_permission.permission_p(o.object_id, :user_id, 'delete')) + then 1 else 0 end + from dual }] } @@ -241,7 +243,9 @@ } if { [db_string type_exists { - select exists (select 1 from acs_object_types t where t.object_type = :group_type) + select case when exists + (select 1 from acs_object_types t where t.object_type = :group_type) + then 1 else 0 end from dual }] } { db_exec_plsql drop_type {} Index: openacs-4/packages/acs-subsite/tcl/subsite-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/tcl/subsite-procs.tcl,v diff -u -r1.68.2.15 -r1.68.2.16 --- openacs-4/packages/acs-subsite/tcl/subsite-procs.tcl 31 Aug 2020 12:42:21 -0000 1.68.2.15 +++ openacs-4/packages/acs-subsite/tcl/subsite-procs.tcl 1 Sep 2020 17:42:50 -0000 1.68.2.16 @@ -323,8 +323,11 @@ @creation-date 2000-02-07 } { return [db_string sub_type_exists_p { - select exists (select 1 from acs_object_types - where supertype = :object_type) from dual + select case when exists + (select 1 from acs_object_types + where supertype = :object_type) + then 1 else 0 end + from dual }] } Index: openacs-4/packages/acs-subsite/tcl/test/acs-subsite-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/tcl/test/acs-subsite-procs.tcl,v diff -u -r1.12.2.16 -r1.12.2.17 --- openacs-4/packages/acs-subsite/tcl/test/acs-subsite-procs.tcl 28 Aug 2020 16:42:29 -0000 1.12.2.16 +++ openacs-4/packages/acs-subsite/tcl/test/acs-subsite-procs.tcl 1 Sep 2020 17:40:42 -0000 1.12.2.17 @@ -12,11 +12,12 @@ found belonging to groups that do not exist anymore. } { aa_false "Leftover group localization message keys do not exist in the database" [db_string leftovers_exist { - select exists (select 1 from lang_message_keys k - where package_key = 'acs-translations' - and message_key like 'group_title_%' - and not exists (select 1 from groups - where group_id = cast(split_part(k.message_key, '_', 3) as integer))) + select case when exists (select 1 from lang_message_keys k + where package_key = 'acs-translations' + and message_key like 'group_title_%' + and not exists (select 1 from groups + where group_id = cast(split_part(k.message_key, '_', 3) as integer))) + then 1 else 0 end from dual }] } @@ -40,9 +41,10 @@ set message_key "group_title_${group_id}" aa_true "Message key was registered correctly" [db_string get_key { - select exists (select 1 from lang_message_keys - where package_key = :package_key - and message_key = :message_key) + select case when exists (select 1 from lang_message_keys + where package_key = :package_key + and message_key = :message_key) + then 1 else 0 end from dual }] @@ -52,9 +54,10 @@ group::delete $group_id aa_false "Message key was deleted correctly" [db_string get_key { - select exists (select 1 from lang_message_keys - where package_key = :package_key - and message_key = :message_key) + select case when exists (select 1 from lang_message_keys + where package_key = :package_key + and message_key = :message_key) + then 1 else 0 end from dual }]