Index: openacs-4/packages/notifications/tcl/notification-request-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/notifications/tcl/notification-request-procs.tcl,v diff -u -r1.14.2.1 -r1.14.2.2 --- openacs-4/packages/notifications/tcl/notification-request-procs.tcl 28 Dec 2021 11:40:24 -0000 1.14.2.1 +++ openacs-4/packages/notifications/tcl/notification-request-procs.tcl 12 Jul 2022 14:15:11 -0000 1.14.2.2 @@ -67,7 +67,12 @@ } { returns true if at least one request exists for this object and type } { - return [expr { [db_string request_count {}] > 0 }] + return [db_0or1row exists { + select 1 from notification_requests + where type_id = :type_id + and object_id = :object_id + fetch first 1 rows only + }] } ad_proc -public request_count { Index: openacs-4/packages/notifications/tcl/notification-request-procs.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/notifications/tcl/notification-request-procs.xql,v diff -u -r1.7 -r1.7.14.1 --- openacs-4/packages/notifications/tcl/notification-request-procs.xql 12 Sep 2006 18:13:38 -0000 1.7 +++ openacs-4/packages/notifications/tcl/notification-request-procs.xql 12 Jul 2022 14:15:11 -0000 1.7.14.1 @@ -12,15 +12,6 @@ - - - select count(*) - from notification_requests - where type_id = :type_id - and object_id = :object_id - - - select count(*)