Index: openacs-4/packages/news-portlet/tcl/news-portlet-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/news-portlet/tcl/news-portlet-procs.tcl,v
diff -u -r1.7 -r1.8
--- openacs-4/packages/news-portlet/tcl/news-portlet-procs.tcl 10 Dec 2001 23:56:24 -0000 1.7
+++ openacs-4/packages/news-portlet/tcl/news-portlet-procs.tcl 11 Jan 2002 21:12:46 -0000 1.8
@@ -95,28 +95,31 @@
and package_id = :instance_id
order by publish_date desc, item_id desc"
- set data ""
+ set data "
"
set rowcount 0
if { $config(shaded_p) == "f" } {
# Should be a list already! XXX rename me!
set list_of_instance_ids $config(community_id)
-# ad_return_complaint 1 "$list_of_instance_ids"
-
foreach instance_id $list_of_instance_ids {
- db_1row select_name \
- "select name
- from site_nodes where node_id= (select parent_id from site_nodes where object_id=:instance_id)"
- append data "
$name (more)"
+ # aks fold into site_nodes:: or dotlrn_community
+ set comm_object_id [db_string select_name "select object_id from site_nodes where node_id= (select parent_id from site_nodes where object_id=:instance_id)" ]
+
+ set name [db_string select_pretty_name "
+ select instance_name
+ from apm_packages
+ where package_id= :comm_object_id "]
+
+ append data "$name News |
"
db_foreach select_news_items $query {
- append data "$publish_date: $publish_title"
+ append data " $publish_title | $publish_date |
"
incr rowcount
}
- set template ""
+ set template "$data
"
if {!$rowcount} {
set template "No news items availablemore..."