Index: openacs-4/contrib/packages/project-manager/tcl/task-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/project-manager/tcl/Attic/task-procs.tcl,v diff -u -r1.4.2.46 -r1.4.2.47 --- openacs-4/contrib/packages/project-manager/tcl/task-procs.tcl 1 Jul 2005 17:34:31 -0000 1.4.2.46 +++ openacs-4/contrib/packages/project-manager/tcl/task-procs.tcl 21 Jul 2005 23:08:36 -0000 1.4.2.47 @@ -952,6 +952,10 @@ @error } { + if {![db_0or1row check_for_ingredient "select 1 from pm_tasks where task_id = :task_item_id_1"] || + ![db_0or1row check_for_ingredient "select 1 from pm_tasks where task_id = :task_item_id_2"]} { + return false + } if {[string equal $task_item_id_1 $task_item_id_2]} { # do nothing @@ -971,7 +975,8 @@ VALUES (:task_item_id_2, :task_item_id_1)" } - + + return true } Index: openacs-4/contrib/packages/project-manager/www/task-link.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/project-manager/www/Attic/task-link.tcl,v diff -u -r1.1.2.5 -r1.1.2.6 --- openacs-4/contrib/packages/project-manager/www/task-link.tcl 4 May 2005 06:13:53 -0000 1.1.2.5 +++ openacs-4/contrib/packages/project-manager/www/task-link.tcl 21 Jul 2005 23:08:36 -0000 1.1.2.6 @@ -29,8 +29,11 @@ # permissions. This is a general 'does the user have permission to even ask for this page to be run?' permission::require_permission -party_id $user_id -object_id $from_task -privilege write -pm::task::link \ - -task_item_id_1 $from_task \ - -task_item_id_2 $to_task - -ad_returnredirect -message "[_ project-manager.Tasks_linked]" $return_url +if {[pm::task::link \ + -task_item_id_1 $from_task \ + -task_item_id_2 $to_task] +} { + ad_returnredirect -message "[_ project-manager.Tasks_linked]" $return_url +} else { + ad_returnredirect -message "[_ project-manager.Tasks_not_linked]" $return_url +}