Index: openacs-4/packages/notifications/tcl/notification-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/notifications/tcl/notification-procs.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/notifications/tcl/notification-procs.tcl 24 May 2002 20:42:42 -0000 1.1 +++ openacs-4/packages/notifications/tcl/notification-procs.tcl 29 May 2002 05:12:01 -0000 1.2 @@ -10,13 +10,40 @@ namespace eval notification { + ad_proc -public package_key {} { + return "notifications" + } + + ad_proc -public get_all_intervals {} { + return [db_list_of_lists select_all_intervals {}] + } + + ad_proc -public get_intervals { + {-type_id:required} + } { + return [db_list_of_lists select_intervals {}] + } + + ad_proc -public get_delivery_methods { + {-type_id:required} + } { + return [db_list_of_lists select_delivery_methods {}] + } + ad_proc -public new { + {-notification_id ""} + {-type_id:required} + {-object_id:required} + {-response_id ""} + {-notif_subject ""} + {-notif_text ""} + {-notif_html ""} } { create a new notification } { # Set up the vars set extra_vars [ns_set create] - oacs_util::vars_to_ns_set -ns_set $extra_vars -var_list {} + 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] @@ -29,9 +56,13 @@ } { delete a notification } { - # do the delete - # FIXME: implement this - db_exec_plsql delete_notification {} + db_transaction { + # Remove the mappings + db_dml delete_mappings {} + + # do the delete + db_exec_plsql delete_notification {} + } } ad_proc -public mark_sent {