Index: openacs-4/packages/project-manager/tcl/project-manager-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/project-manager/tcl/project-manager-procs.tcl,v diff -u -r1.14 -r1.15 --- openacs-4/packages/project-manager/tcl/project-manager-procs.tcl 22 May 2006 06:14:27 -0000 1.14 +++ openacs-4/packages/project-manager/tcl/project-manager-procs.tcl 5 Jun 2006 11:57:30 -0000 1.15 @@ -540,21 +540,6 @@ @error } { - # HTML portions of this copied from notification::email::send - - if {[string equal $mime_type "text/plain"]} { - set body_text $body - set body_html [ad_html_text_convert -from $mime_type -to "text/html" -- $body] - } elseif {[string equal $mime_type "text/html"]} { - set body_text [ad_html_text_convert -from $mime_type -to "text/plain" -- $body] - set body_html $body - - } else { - set body_text [ad_html_text_convert -from $mime_type -to "text/plain" -- $body] - set body_html [ad_html_text_convert -from $mime_type -to "text/html" -- $body] - - } - # Use this to build up extra mail headers set extra_headers [ns_set new] Index: openacs-4/packages/project-manager/tcl/project-procs-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/project-manager/tcl/project-procs-postgresql.xql,v diff -u -r1.12 -r1.13 --- openacs-4/packages/project-manager/tcl/project-procs-postgresql.xql 26 May 2006 15:52:15 -0000 1.12 +++ openacs-4/packages/project-manager/tcl/project-procs-postgresql.xql 5 Jun 2006 11:57:30 -0000 1.13 @@ -402,6 +402,17 @@ + + + + select i.item_id as project_item_id + from cr_items i, pm_projects p + where p.project_id = i.latest_revision + and i.parent_id in ([join $project_list ,]) + + + + select Index: openacs-4/packages/project-manager/tcl/project-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/project-manager/tcl/project-procs.tcl,v diff -u -r1.33 -r1.34 --- openacs-4/packages/project-manager/tcl/project-procs.tcl 26 May 2006 15:52:15 -0000 1.33 +++ openacs-4/packages/project-manager/tcl/project-procs.tcl 5 Jun 2006 11:57:30 -0000 1.34 @@ -3336,6 +3336,25 @@ return $html } +ad_proc -public pm::project::subprojects { + {-project_item_id:required} +} { + get the project_item_ids of the current project and all subprojects +} { + set project_list $project_item_id + set count 0 + while {$count < [llength $project_list]} { + set count [llength $project_list] + db_foreach subprojects {} { + if {[lsearch -exact $project_list $project_item_id] == -1} { + lappend project_list $project_item_id + } + } + } + + return $project_list +} + ad_proc -public pm::project::get_all_subprojects { {-project_item_id:required} } {