Index: openacs-4/packages/forums/tcl/forum-reply-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/forums/tcl/forum-reply-procs.tcl,v diff -u -r1.1 -r1.1.1.1 --- openacs-4/packages/forums/tcl/forum-reply-procs.tcl 29 Jun 2002 00:21:46 -0000 1.1 +++ openacs-4/packages/forums/tcl/forum-reply-procs.tcl 28 Jun 2006 20:30:28 -0000 1.1.1.1 @@ -13,13 +13,35 @@ ad_proc -public get_url { object_id } { + returns a full url to the object_id. + handles messages and forums. + } { + set object_type [db_string select_object_type {}] + + if {[string compare $object_type "forums_message"] == 0} { + + # object is a message + set message_id $object_id + forum::message::get -message_id $message_id -array message + set forum_id $message(forum_id) + set forum_url "[ad_url][db_string select_forums_package_url {}]" + return ${forum_url}message-view?message_id=$message(root_message_id) + + } else { + + # object_type is a forum + set forum_id $object_id + set forum_url "[ad_url][db_string select_forums_package_url {}]" + return ${forum_url}forum-view?forum_id=$forum_id + + } } ad_proc -public process_reply { reply_id } { - ns_log Notice "FORUM-NOTIF: processing reply $reply_id" + ns_log debug "forum::notification::process_reply: processing reply $reply_id" # Get the data notification::reply::get -reply_id $reply_id -array reply @@ -37,3 +59,6 @@ } + + +