X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/timetracker.git/blobdiff_plain/afb1ca7aaa68c5b34da82ed58b7e06df1c1525ab..c360da4bcfd113a87bc156e0f009e968d8a8bf07:/WEB-INF/lib/ttAdmin.class.php diff --git a/WEB-INF/lib/ttAdmin.class.php b/WEB-INF/lib/ttAdmin.class.php index d6b9696a..87fe00bc 100644 --- a/WEB-INF/lib/ttAdmin.class.php +++ b/WEB-INF/lib/ttAdmin.class.php @@ -183,8 +183,8 @@ class ttAdmin { return true; } - // validateTeamInfo validates team information entered by user. - function validateTeamInfo($fields) { + // validateGroupInfo validates group information entered by user. + function validateGroupInfo($fields) { global $i18n; global $auth; @@ -233,9 +233,9 @@ class ttAdmin { return $result; } - // updateTeam validates user input and updates the team with new information. - function updateTeam($team_id, $fields) { - if (!$this->validateTeamInfo($fields)) return false; // Can't continue as user input is invalid. + // updateGroup validates user input and updates the group with new information. + function updateGroup($team_id, $fields) { + if (!$this->validateGroupInfo($fields)) return false; // Can't continue as user input is invalid. global $user; $mdb2 = getConnection(); @@ -264,27 +264,8 @@ class ttAdmin { return true; } - // setCreatedByAdmin sets created_by field for both group and its top manager to admin account. - function setCreatedByAdmin($team_id, $user_id) { - global $user; - $mdb2 = getConnection(); - - // Update created_by for group. - $sql = "update tt_teams set created_by = $user->id where id = $team_id"; - $affected = $mdb2->exec($sql); - if (is_a($affected, 'PEAR_Error')) { - $this->err->add($i18n->getKey('error.db')); - return false; - } - - // Update created_by for top manager. - $sql = "update tt_users set created_by = $user->id where id = $user_id"; - $affected = $mdb2->exec($sql); - if (is_a($affected, 'PEAR_Error')) { - $this->err->add($i18n->getKey('error.db')); - return false; - } - - return true; + // updateSelf validates user input and updates admin account with new information. + function updateSelf($fields) { + return false; // Not yet implemeneted. } }