Index: openacs-4/packages/notifications/tcl/sweep-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/notifications/tcl/sweep-procs.tcl,v diff -u -r1.26 -r1.27 --- openacs-4/packages/notifications/tcl/sweep-procs.tcl 1 May 2018 09:06:57 -0000 1.26 +++ openacs-4/packages/notifications/tcl/sweep-procs.tcl 7 May 2018 14:46:16 -0000 1.27 @@ -17,10 +17,10 @@ # Also sweep the dynamic notification requests that have been sent out db_dml delete_dynamic_requests {} - # before the killing starts, remove invalid requests - foreach request_id [db_list select_invalid_request_ids {}] { - notification::request::delete -request_id $request_id - } + # before the killing starts, remove invalid requests + foreach request_id [db_list select_invalid_request_ids {}] { + notification::request::delete -request_id $request_id + } # Get the list of the ones to kill set notification_id_list [db_list select_notification_ids {}] @@ -31,7 +31,7 @@ } } - + ad_proc -public sweep_notifications { {-interval_id:required} {-batched_p 0} @@ -51,7 +51,7 @@ set list_of_notification_ids [list] set batched_content_text "" set batched_content_html "" - set batched_file_ids [list] + set batched_file_ids [list] set summary_text "[_ notifications.Contents]/n" set summary_html "
" - set batched_file_ids [linsert $batched_file_ids 0 [ns_set get $notif file_ids]] - + set batched_file_ids [linsert $batched_file_ids 0 {*}[ns_set get $notif file_ids]] + lappend list_of_notification_ids [ns_set get $notif notification_id] # Set the vars set prev_user_id $user_id set prev_type_id $type_id set prev_deliv_method_id [ns_set get $notif delivery_method_id] } - + } else { # Unbatched foreach notif $notifications { @@ -164,19 +164,18 @@ -subject [ns_set get $notif notif_subject] \ -content_text [ns_set get $notif notif_text] \ -content_html [ns_set get $notif notif_html] \ - -file_ids [ns_set get $notif file_ids] \ + -file_ids [ns_set get $notif file_ids] \ -reply_object_id [ns_set get $notif response_id] \ -delivery_method_id [ns_set get $notif delivery_method_id] - - # Markt it as sent + + # Mark it as sent notification::mark_sent \ - -notification_id [ns_set get $notif notification_id] \ - -user_id [ns_set get $notif user_id] + -notification_id [ns_set get $notif notification_id] \ + -user_id [ns_set get $notif user_id] } } - } + } } - } # Local variables: