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 "

[_ notifications.Contents]


$batched_content_html" \ - -file_ids $batched_file_ids \ - -delivery_method_id $prev_deliv_method_id - + -to_user_id $prev_user_id \ + -notification_type_id $prev_type_id \ + -subject "[_ notifications.lt_system_name_-_Batched]" \ + -content_text "$summary_text $batched_content_text" \ + -content_html "$summary_html
$batched_content_html" \ + -file_ids $batched_file_ids \ + -delivery_method_id $prev_deliv_method_id + ns_log Debug "NOTIF-BATCHED: marking notifications" foreach not_id $list_of_notification_ids { - # Mark it as sent + # Mark it as sent notification::mark_sent \ - -notification_id $not_id \ - -user_id $prev_user_id - } + -notification_id $not_id \ + -user_id $prev_user_id + } } # Reset things 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 "

[_ notifications.Contents]