Index: openacs.org-dev/packages/notifications/tcl/notification-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs.org-dev/packages/notifications/tcl/notification-procs.tcl,v diff -u -N -r1.1 -r1.2 --- openacs.org-dev/packages/notifications/tcl/notification-procs.tcl 9 Jul 2002 17:35:10 -0000 1.1 +++ openacs.org-dev/packages/notifications/tcl/notification-procs.tcl 12 Feb 2003 13:18:07 -0000 1.2 @@ -51,16 +51,16 @@ {-notif_text ""} {-notif_html ""} } { - create a new notification + create a new notification if any notification requests exist for the object and type } { - # Set up the vars - set extra_vars [ns_set create] - oacs_util::vars_to_ns_set -ns_set $extra_vars -var_list {notification_id type_id object_id response_id notif_subject notif_text notif_html} + if { [notification::request::request_exists -object_id $object_id -type_id $type_id] } { + # Set up the vars + set extra_vars [ns_set create] + oacs_util::vars_to_ns_set -ns_set $extra_vars -var_list {notification_id type_id object_id response_id notif_subject notif_text notif_html} - # Create the request - set notification_id [package_instantiate_object -extra_vars $extra_vars notification] - - return $notification_id + # Create the request + package_instantiate_object -extra_vars $extra_vars notification + } } ad_proc -public delete { @@ -84,6 +84,7 @@ mark that a user has been sent a notification } { # Do the insert +ns_log Notice "DRB: marking notification $notification_id sent for user $user_id" db_dml insert_notification_user_map {} } }