Index: openacs-4/contrib/packages/classified-ads/tcl/ads-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/classified-ads/tcl/ads-procs.tcl,v diff -u -r1.5 -r1.6 --- openacs-4/contrib/packages/classified-ads/tcl/ads-procs.tcl 23 Jul 2003 21:08:19 -0000 1.5 +++ openacs-4/contrib/packages/classified-ads/tcl/ads-procs.tcl 24 Jul 2003 01:04:48 -0000 1.6 @@ -90,16 +90,25 @@ } { upvar $array row - # Get extra widgets that we need to display - # + # + # Get some necessary information + # + set package_id [ad_conn package_id] set content_type "ca_ad" - set widget_list [db_list_of_ns_sets select_widgets {}] if {[empty_string_p $revision_id]} { set revision_id [classified-ads::get_latest_revision -item_id $ad_id] } + set keyword_id [classified-ads::ads::get_category_id -ad_id $ad_id] + + # + # Get extra widgets that we need to display + # + + set widget_list [db_list_of_ns_sets select_widgets {}] + # object_id, object_type, context_id, security_inherit_p, creation_user, # creation_date, creation_ip, last_modified, modifying_user, modifying_ip, # tree_sortkey, revision_id, title, item_id, description, publish_date, @@ -109,6 +118,7 @@ set row(pretty_publish_date) [util_AnsiDatetoPrettyDate $row(publish_date)] set row(data) [classified-ads::get_content -revision_id $revision_id] + set row(keyword_id) $keyword_id return 0 } @@ -174,7 +184,11 @@ @author Roberto Mello } { - return [db_0or1row get_category_id {}] + if { [db_0or1row get_category_id {}] } { + return $keyword_id + } else { + return 0 + } } ad_proc -public classified-ads::ads::generate_trail {