Index: openacs.org-dev/packages/notifications/www/object-goto.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs.org-dev/packages/notifications/www/object-goto.tcl,v diff -u -r1.1 -r1.2 --- openacs.org-dev/packages/notifications/www/object-goto.tcl 8 Oct 2002 15:47:15 -0000 1.1 +++ openacs.org-dev/packages/notifications/www/object-goto.tcl 23 Jan 2003 17:54:57 -0000 1.2 @@ -6,6 +6,7 @@ @cvs-id $Id$ } { object_id:notnull + type_id } @@ -19,5 +20,27 @@ # meta-data about the object_type to auto-generate # the url. -ad_returnredirect [forum::notification::get_url $object_id] +# this is just wrong. there is a notification service contract for +# the object URL +# unfortunately it wasn't implemented in any of the packages. +# this is the way it should work, but I don't want to fool around with the +# data model +# the implementation name should probably be stored instead of the id + +# look in tcl/delivery-procs.tcl, there is a get_impl_key proc that +# queries the acs_sc_impls table for the implementation name +# but the query is delivery_type specific, so we can't use it here + +set sc_impl_name [db_string get_notif_type { + select impl_name + from acs_sc_impls, notification_types + where type_id=:type_id + and acs_sc_impls.impl_id=notification_types.sc_impl_id +}] + +set url [acs_sc_call NotificationType GetURL [list $object_id] $sc_impl_name] +ns_log notice "DAVEB: url=$url" +ad_returnredirect $url +#ad_returnredirect [forum::notification::get_url $object_id] +