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.8 -r1.8.2.1 --- openacs-4/packages/notifications/tcl/notification-request-procs.tcl 29 Jun 2004 10:18:42 -0000 1.8 +++ openacs-4/packages/notifications/tcl/notification-request-procs.tcl 19 Jul 2005 06:16:13 -0000 1.8.2.1 @@ -62,6 +62,15 @@ return [expr { [db_string request_count {}] > 0 }] } + ad_proc -public request_count { + {-type_id:required} + {-object_id:required} + } { + returns number of notification requests for this type and object + } { + return [db_string request_count {} -default 0] + } + ad_proc -public delete { {-request_id:required} } { 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.4 -r1.4.8.1 --- openacs-4/packages/notifications/tcl/notification-request-procs.xql 16 Jan 2003 13:53:10 -0000 1.4 +++ openacs-4/packages/notifications/tcl/notification-request-procs.xql 19 Jul 2005 06:16:13 -0000 1.4.8.1 @@ -21,4 +21,13 @@ + + + select count(*) + from notification_requests + where type_id = :type_id + and object_id = :object_id + + +