X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=WEB-INF%2Flib%2FttTaskHelper.class.php;h=b02271b9537fd981c3b4850233624111a98713e3;hb=bd92aeb3404ed8625272abccc9a8766f13ab75e6;hp=e09c882d31173a6d9fd3d65b9611d486760d0bd0;hpb=45c855269d952873285f7a835e82fc2b3eff3971;p=timetracker.git diff --git a/WEB-INF/lib/ttTaskHelper.class.php b/WEB-INF/lib/ttTaskHelper.class.php index e09c882d..b02271b9 100644 --- a/WEB-INF/lib/ttTaskHelper.class.php +++ b/WEB-INF/lib/ttTaskHelper.class.php @@ -184,7 +184,7 @@ class ttTaskHelper { return $last_id; } - // update function updates a task in the database. + // update function updates a task in the database. static function update($fields) { global $user; @@ -219,7 +219,7 @@ class ttTaskHelper { // Handle task binds in the tasks field of the tt_projects table. // We need to either delete or insert task id in all affected projects. - // Get all not deleted projects for team. + // Get all not deleted projects for group. $sql = "select id, tasks from tt_projects where group_id = $user->group_id and status is not NULL"; $res = $mdb2->query($sql); if (is_a($res, 'PEAR_Error')) @@ -237,14 +237,14 @@ class ttTaskHelper { if ($task_ids) { $task_ids .= ",$task_id"; $task_ids = ttTaskHelper::sort($task_ids); - } else - $task_ids = $task_id; + } else + $task_ids = $task_id; - $sql = "update tt_projects set tasks = ".$mdb2->quote($task_ids)." where id = $project_id"; - $affected = $mdb2->exec($sql); - if (is_a($affected, 'PEAR_Error')) - die($affected->getMessage()); - } + $sql = "update tt_projects set tasks = ".$mdb2->quote($task_ids)." where id = $project_id"; + $affected = $mdb2->exec($sql); + if (is_a($affected, 'PEAR_Error')) + die($affected->getMessage()); + } } else { // Task needs to be removed from this project. if (in_array($task_id, $task_arr)) {