X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=WEB-INF%2Flib%2FttTaskHelper.class.php;h=2bb99da424374a896a0078b21cbee4fb5913ac4f;hb=955fd23bfdcee44acebe95fcfbae416c8e21649b;hp=b9198e40698a995e965b9e92cc8c5bf700a97dde;hpb=9a23a8c0a51b7ec38a96f525484134f3cb85dc7e;p=timetracker.git diff --git a/WEB-INF/lib/ttTaskHelper.class.php b/WEB-INF/lib/ttTaskHelper.class.php index b9198e40..2bb99da4 100644 --- a/WEB-INF/lib/ttTaskHelper.class.php +++ b/WEB-INF/lib/ttTaskHelper.class.php @@ -29,8 +29,8 @@ // Class ttTaskHelper is used to help with task related operations. class ttTaskHelper { - // getTask - gets details of the task identified by its id. - static function getTask($id) + // get - gets details of a task identified by its id. + static function get($id) { global $user; @@ -79,13 +79,12 @@ class ttTaskHelper { $sql = "select id from tt_tasks where team_id = $user->team_id and name = ". $mdb2->quote($task_name)." and (status = 1 or status = 0)"; - $res = $mdb2->query($sql); + $res = $mdb2->query($sql); - if (!is_a($res, 'PEAR_Error')) { + if (!is_a($res, 'PEAR_Error')) { $val = $res->fetchRow(); - if ($val['id']) { + if ($val['id']) return $val; - } } return false; } @@ -185,7 +184,7 @@ class ttTaskHelper { return $last_id; } - // update function updates a task in database. + // update function updates a task in the database. static function update($fields) { global $user; @@ -290,4 +289,3 @@ class ttTaskHelper { return $result; } } -?> \ No newline at end of file