Fix: Do not overwrite global $user information

This commit is contained in:
Laurent Destailleur 2012-08-07 14:54:56 +02:00
parent 068c536741
commit 040c675de6

View File

@ -170,6 +170,7 @@ if (! empty($project_ref) && ! empty($withproject))
llxHeader("",$langs->trans("Task")); llxHeader("",$langs->trans("Task"));
$form = new Form($db); $form = new Form($db);
$userstatic = new User($db);
if ($id > 0 || ! empty($ref)) if ($id > 0 || ! empty($ref))
{ {
@ -403,17 +404,17 @@ if ($id > 0 || ! empty($ref))
print '</td>'; print '</td>';
// User // User
$user->id = $task_time->fk_user;
print '<td>'; print '<td>';
if ($_GET['action'] == 'editline' && $_GET['lineid'] == $task_time->rowid) if ($_GET['action'] == 'editline' && $_GET['lineid'] == $task_time->rowid)
{ {
print $form->select_users($user->id,'userid_line'); print $form->select_users($task_time->fk_user,'userid_line');
} }
else else
{ {
$user->nom = $task_time->name; $userstatic->id = $task_time->fk_user;
$user->prenom = $task_time->firstname; $userstatic->nom = $task_time->name;
print $user->getNomUrl(1); $userstatic->prenom = $task_time->firstname;
print $userstatic->getNomUrl(1);
} }
print '</td>'; print '</td>';