projects
/
timetracker.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Refactored mobile expenses.php for subgroups.
[timetracker.git]
/
WEB-INF
/
lib
/
ttUserHelper.class.php
diff --git
a/WEB-INF/lib/ttUserHelper.class.php
b/WEB-INF/lib/ttUserHelper.class.php
index
42d7c91
..
0d628f6
100644
(file)
--- a/
WEB-INF/lib/ttUserHelper.class.php
+++ b/
WEB-INF/lib/ttUserHelper.class.php
@@
-189,7
+189,7
@@
class ttUserHelper {
// otherwise de-activate the bind (set its status to inactive). This will keep the bind
// and its rate in database for reporting.
// otherwise de-activate the bind (set its status to inactive). This will keep the bind
// and its rate in database for reporting.
- $all_projects = ttTeamHelper::getAllProjects($user->g
roup_id
);
+ $all_projects = ttTeamHelper::getAllProjects($user->g
etGroup()
);
$assigned_projects = isset($fields['projects']) ? $fields['projects'] : array();
foreach($all_projects as $p) {
$assigned_projects = isset($fields['projects']) ? $fields['projects'] : array();
foreach($all_projects as $p) {
@@
-228,8
+228,6
@@
class ttUserHelper {
ttUserHelper::insertBind(array(
'user_id' => $user_id,
'project_id' => $project_id,
ttUserHelper::insertBind(array(
'user_id' => $user_id,
'project_id' => $project_id,
- 'group_id' => $user->getGroup(),
- 'org_id' => $user->org_id,
'rate' => $rate,
'status' => ACTIVE));
}
'rate' => $rate,
'status' => ACTIVE));
}
@@
-315,10
+313,8
@@
class ttUserHelper {
global $user;
$mdb2 = getConnection();
global $user;
$mdb2 = getConnection();
- // This may be used during import. Use the following until we have import refactored.
- $group_id = $fields['group_id'] ? (int) $fields['group_id'] : $user->getGroup();
- $org_id = $fields['org_id'] ? (int) $fields['org_id'] : $user->org_id;
-
+ $group_id = $user->getGroup();
+ $org_id = $user->org_id;
$user_id = (int) $fields['user_id'];
$project_id = (int) $fields['project_id'];
$rate = $mdb2->quote($fields['rate']);
$user_id = (int) $fields['user_id'];
$project_id = (int) $fields['project_id'];
$rate = $mdb2->quote($fields['rate']);