diff --git a/htdocs/core/class/html.formprojet.class.php b/htdocs/core/class/html.formprojet.class.php index c2d8377add5..cb31107c65c 100644 --- a/htdocs/core/class/html.formprojet.class.php +++ b/htdocs/core/class/html.formprojet.class.php @@ -306,10 +306,9 @@ class FormProjets * @param int $disabled Disabled * @param string $morecss More css added to the select component * @param User $usertofilter User object to use for filtering - * @param int $forceuserfilter 1=Force individual task user rights even if user has right to see all * @return int Nbr of project if OK, <0 if KO */ - function selectTasks($socid=-1, $selected='', $htmlname='taskid', $maxlength=24, $option_only=0, $show_empty='1', $discard_closed=0, $forcefocus=0, $disabled=0, $morecss='maxwidth500', $usertofilter=null, $forceuserfilter=0) + function selectTasks($socid=-1, $selected='', $htmlname='taskid', $maxlength=24, $option_only=0, $show_empty='1', $discard_closed=0, $forcefocus=0, $disabled=0, $morecss='maxwidth500', $usertofilter=null) { global $user,$conf,$langs; @@ -326,7 +325,7 @@ class FormProjets if (! empty($conf->global->PROJECT_HIDE_UNSELECTABLES)) $hideunselectables = true; $projectsListId = false; - if (empty($usertofilter->rights->projet->all->lire) || $forceuserfilter) + if (empty($usertofilter->rights->projet->all->lire)) { $projectstatic=new Project($this->db); $projectsListId = $projectstatic->getProjectsAuthorizedForUser($usertofilter,0,1); diff --git a/htdocs/projet/activity/perday.php b/htdocs/projet/activity/perday.php index b1214f0bff7..b27572790dd 100644 --- a/htdocs/projet/activity/perday.php +++ b/htdocs/projet/activity/perday.php @@ -399,7 +399,7 @@ print '
'; $titleassigntask = $langs->trans("AssignTaskToMe"); if ($usertoprocess->id != $user->id) $titleassigntask = $langs->trans("AssignTaskToUser", $usertoprocess->getFullName($langs)); print '
'; -$formproject->selectTasks($socid?$socid:-1, $taskid, 'taskid', 32, 0, 1, 1, 0, 0, '', $usertoprocess, 1); +$formproject->selectTasks($socid?$socid:-1, $taskid, 'taskid', 32, 0, 1, 1, 0, 0, '', $usertoprocess); print '
'; print ' '; print $formcompany->selectTypeContact($object, '', 'type','internal','rowid', 0, 'maxwidth200'); diff --git a/htdocs/projet/activity/perweek.php b/htdocs/projet/activity/perweek.php index d18afc573e1..3d2e638849e 100644 --- a/htdocs/projet/activity/perweek.php +++ b/htdocs/projet/activity/perweek.php @@ -402,7 +402,7 @@ print '
'; $titleassigntask = $langs->trans("AssignTaskToMe"); if ($usertoprocess->id != $user->id) $titleassigntask = $langs->trans("AssignTaskToUser", $usertoprocess->getFullName($langs)); print '
'; -$formproject->selectTasks($socid?$socid:-1, $taskid, 'taskid', 32, 0, 1, 1, 0, 0, '', $usertoprocess, 1); +$formproject->selectTasks($socid?$socid:-1, $taskid, 'taskid', 32, 0, 1, 1, 0, 0, '', $usertoprocess); print '
'; print ' '; print $formcompany->selectTypeContact($object, '', 'type','internal','rowid', 0, 'maxwidth200');