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.7 -r1.8 --- openacs-4/packages/notifications/tcl/notification-procs.tcl 17 May 2003 10:54:25 -0000 1.7 +++ openacs-4/packages/notifications/tcl/notification-procs.tcl 28 Aug 2003 09:41:58 -0000 1.8 @@ -83,6 +83,7 @@ {-force:boolean} {-default_request_data {}} {-return_notified:boolean} + {-notif_user {}} } { Create a new notification if any notification requests exist for the object and type. @@ -264,6 +265,10 @@ } } + if { [empty_string_p $notif_user] && [ad_conn isconnected] } { + set notif_user [ad_conn user_id] + } + # Actually carry out inserting the notification db_transaction { if { $subset_arg_p || $already_notified_arg_p } { @@ -290,9 +295,14 @@ set object_id $action_id } + # Truncate notif_subject to the max len of 100 + set notif_subject [string_truncate -len 100 $notif_subject] + # 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} + 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 notif_user} # Create the notification package_instantiate_object -extra_vars $extra_vars notification