Index: openacs-4/packages/lars-blogger/tcl/entry-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lars-blogger/tcl/entry-procs.tcl,v diff -u -r1.1 -r1.1.2.1 --- openacs-4/packages/lars-blogger/tcl/entry-procs.tcl 14 Sep 2002 21:43:36 -0000 1.1 +++ openacs-4/packages/lars-blogger/tcl/entry-procs.tcl 13 Mar 2003 14:30:03 -0000 1.1.2.1 @@ -3,44 +3,42 @@ } -namespace eval lars_blogger::entry { +namespace eval lars_blogger::entry {} - ad_proc -public get { - -entry_id:required - -array:required - } { - # Select the info into the upvar'ed Tcl Array - upvar $array row +ad_proc -public lars_blogger::entry::get { + -entry_id:required + -array:required +} { + # Select the info into the upvar'ed Tcl Array + upvar $array row - db_1row select_entry { *SQL* } -column_array row - } + db_1row select_entry {} -column_array row +} - ad_proc -public do_notifications { - {-entry_id:required} - } { - # Select all the important information - get -entry_id $entry_id -array blog +ad_proc -public do_notifications { + {-entry_id:required} +} { + # Select all the important information + get -entry_id $entry_id -array blog - set blog_url "[ad_url][lars_blog_public_package_url -package_id $blog(package_id)]" - set entry_url "[ad_url][lars_blog_public_package_url -package_id $blog(package_id)]one-entry?[export_vars { entry_id }]" - set blog_name [lars_blog_name -package_id $blog(package_id)] + set blog_url "[ad_url][lars_blog_public_package_url -package_id $blog(package_id)]" + set entry_url "[ad_url][lars_blog_public_package_url -package_id $blog(package_id)]one-entry?[export_vars { entry_id }]" + set blog_name [lars_blog_name -package_id $blog(package_id)] - set new_content "" - append new_content "$blog(poster_first_names) $blog(poster_last_name) posted to $blog_name at $blog(posted_time_pretty) on $blog(entry_date_pretty):\n\n" - append new_content "$blog(title)\n\n" - append new_content "[ad_convert_to_text -- [ns_adp_parse -string $blog(content)]]\n\n" - append new_content "This entry: $entry_url\n\n" - append new_content "$blog_name: $blog_url\n" + set new_content "" + append new_content "$blog(poster_first_names) $blog(poster_last_name) posted to $blog_name at $blog(posted_time_pretty) on $blog(entry_date_pretty):\n\n" + append new_content "$blog(title)\n\n" + append new_content "[ad_convert_to_text -- [ns_adp_parse -string $blog(content)]]\n\n" + append new_content "This entry: $entry_url\n\n" + append new_content "$blog_name: $blog_url\n" - # Do the notification for the forum - notification::new \ - -type_id [notification::type::get_type_id \ - -short_name lars_blogger_notif] \ - -object_id $blog(package_id) \ - -response_id $blog(entry_id) \ - -notif_subject $blog(title) \ - -notif_text $new_content - } - -} \ No newline at end of file + # Do the notification for the forum + notification::new \ + -type_id [notification::type::get_type_id \ + -short_name lars_blogger_notif] \ + -object_id $blog(package_id) \ + -response_id $blog(entry_id) \ + -notif_subject $blog(title) \ + -notif_text $new_content +}