+
+ // Start with project itself. Reason: if the passed in project_id is bogus,
+ // we'll fail right here and don't damage any other data.
+
+ // Mark project as deleted and remove associated tasks.
+ $sql = "update tt_projects set status = NULL, tasks = NULL where id = $id and group_id = $user->group_id";
+ $affected = $mdb2->exec($sql);
+ if (is_a($affected, 'PEAR_Error') || 0 == $affected)
+ return false; // An error ocurred, or 0 rows updated.
+