Index: openacs-4/packages/acs-lang/tcl/test/acs-lang-localization-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-lang/tcl/test/acs-lang-localization-procs.tcl,v diff -u -N -r1.4.2.5 -r1.4.2.6 --- openacs-4/packages/acs-lang/tcl/test/acs-lang-localization-procs.tcl 28 Aug 2020 12:23:27 -0000 1.4.2.5 +++ openacs-4/packages/acs-lang/tcl/test/acs-lang-localization-procs.tcl 1 Sep 2020 17:27:24 -0000 1.4.2.6 @@ -178,11 +178,11 @@ -text $it_text aa_true "#${package_key}.$message_key#: fallback en_US message was registered" [db_string check { - select exists (select 1 from lang_messages + select case when exists (select 1 from lang_messages where package_key = :package_key and message_key = :message_key and locale = 'en_US' - and message = :it_text) + and message = :it_text) then 1 else 0 end from dual }] @@ -194,16 +194,16 @@ -message_key $message_key \ -text $en_text aa_true "#${package_key}.$message_key#: en_US message was updated, while it_IT message was not affected" [db_string check { - select exists (select 1 from lang_messages - where package_key = :package_key - and message_key = :message_key - and locale = 'en_US' - and message = :en_text) and - exists (select 1 from lang_messages - where package_key = :package_key - and message_key = :message_key - and locale = 'it_IT' - and message = :it_text) + select case when exists (select 1 from lang_messages + where package_key = :package_key + and message_key = :message_key + and locale = 'en_US' + and message = :en_text) and + exists (select 1 from lang_messages + where package_key = :package_key + and message_key = :message_key + and locale = 'it_IT' + and message = :it_text) then 1 else 0 end from dual }] @@ -215,16 +215,16 @@ -message_key $message_key \ -text $it_text aa_true "#${package_key}.$message_key#: it_IT message was updated, while en_US message was not affected" [db_string check { - select exists (select 1 from lang_messages - where package_key = :package_key - and message_key = :message_key - and locale = 'en_US' - and message = :en_text) and - exists (select 1 from lang_messages - where package_key = :package_key - and message_key = :message_key - and locale = 'it_IT' - and message = :it_text) + select case when exists (select 1 from lang_messages + where package_key = :package_key + and message_key = :message_key + and locale = 'en_US' + and message = :en_text) and + exists (select 1 from lang_messages + where package_key = :package_key + and message_key = :message_key + and locale = 'it_IT' + and message = :it_text) then 1 else 0 end from dual }] } Index: openacs-4/packages/acs-tcl/tcl/apm-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/apm-procs.tcl,v diff -u -N -r1.114.2.13 -r1.114.2.14 --- openacs-4/packages/acs-tcl/tcl/apm-procs.tcl 13 Jul 2020 12:02:33 -0000 1.114.2.13 +++ openacs-4/packages/acs-tcl/tcl/apm-procs.tcl 1 Sep 2020 17:31:32 -0000 1.114.2.14 @@ -993,9 +993,11 @@ package_key } { return [db_string apm_package_installed_p { - select exists (select 1 from apm_package_versions - where package_key = :package_key - and installed_p) from dual + select case when exists + (select 1 from apm_package_versions + where package_key = :package_key + and installed_p) then 1 else 0 end + from dual }] } Index: openacs-4/packages/acs-tcl/tcl/site-nodes-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/site-nodes-procs.tcl,v diff -u -N -r1.141.2.26 -r1.141.2.27 --- openacs-4/packages/acs-tcl/tcl/site-nodes-procs.tcl 1 Sep 2020 17:32:07 -0000 1.141.2.26 +++ openacs-4/packages/acs-tcl/tcl/site-nodes-procs.tcl 1 Sep 2020 17:33:01 -0000 1.141.2.27 @@ -1236,7 +1236,10 @@ ns_log notice "NO-CACHE has_children called with $node_id" ::xo::dc get_value -prepare integer has_children { - select exists(select 1 from site_nodes where parent_id = :node_id) + select case when exists + (select 1 from site_nodes where parent_id = :node_id) + then 1 else 0 end + from dual } } Index: openacs-4/packages/file-storage/www/folder-chunk.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/file-storage/www/folder-chunk.tcl,v diff -u -N -r1.61.2.6 -r1.61.2.7 --- openacs-4/packages/file-storage/www/folder-chunk.tcl 21 Jul 2020 14:06:40 -0000 1.61.2.6 +++ openacs-4/packages/file-storage/www/folder-chunk.tcl 1 Sep 2020 17:29:22 -0000 1.61.2.7 @@ -194,9 +194,10 @@ if {$allow_bulk_actions} { set user_id [ad_conn user_id] set bulk_delete_p [db_string some_deletables { - select exists (select 1 from fs_objects - where parent_id = :folder_id - and acs_permission.permission_p(object_id, :viewing_user_id, 'delete')) + select case when exists (select 1 from fs_objects + where parent_id = :folder_id + and acs_permission.permission_p(object_id, :viewing_user_id, 'delete')) then 1 else 0 end + from dual }] set bulk_copy_p [permission::permission_p -object_id $folder_id -privilege write] Index: openacs-4/packages/forums/www/admin/subscribe-others-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/forums/www/admin/subscribe-others-2.tcl,v diff -u -N -r1.11.2.1 -r1.11.2.2 --- openacs-4/packages/forums/www/admin/subscribe-others-2.tcl 1 Sep 2020 15:19:33 -0000 1.11.2.1 +++ openacs-4/packages/forums/www/admin/subscribe-others-2.tcl 1 Sep 2020 17:30:27 -0000 1.11.2.2 @@ -112,7 +112,9 @@ # create new user set user_exists_p [db_string user_id { - select exists (select 1 from parties where email = lower(:email)) + select case when exists + (select 1 from parties where email = lower(:email)) + then 1 else 0 end from dual }] 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 -N -r1.216.2.6 -r1.216.2.7 --- openacs-4/packages/new-portal/tcl/portal-procs.tcl 24 Aug 2020 12:06:21 -0000 1.216.2.6 +++ openacs-4/packages/new-portal/tcl/portal-procs.tcl 1 Sep 2020 17:24:47 -0000 1.216.2.7 @@ -2489,7 +2489,16 @@ } { set ds_id [get_datasource_id $portlet_name] - return [db_string portlet_visible {}] + 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 + }] } # Local variables: Index: openacs-4/packages/new-portal/tcl/portal-procs.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/new-portal/tcl/portal-procs.xql,v diff -u -N -r1.52.2.2 -r1.52.2.3 --- openacs-4/packages/new-portal/tcl/portal-procs.xql 8 Jan 2020 11:55:19 -0000 1.52.2.2 +++ openacs-4/packages/new-portal/tcl/portal-procs.xql 1 Sep 2020 17:24:47 -0000 1.52.2.3 @@ -861,17 +861,5 @@ - - - select 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') from dual - - -