diff --git a/htdocs/html.formother.class.php b/htdocs/html.formother.class.php index 5e2ada84236..f5bdb67d821 100644 --- a/htdocs/html.formother.class.php +++ b/htdocs/html.formother.class.php @@ -235,12 +235,13 @@ class FormOther /** * \brief Retourn list of project and tasks * \param selected Pre-selected value + * \param projectid Project id * \param htmlname Name of html select * \param modeproject 1 to restrict on projects owned by user * \param modetask 1 to restrict on tasks associated to user * \param mode 0=Return list of tasks and their projects, 1=Return projects and tasks if exists */ - function selectProjectTasks($selected='',$htmlname='task_parent', $modeproject=0, $modetask=0, $mode) + function selectProjectTasks($selected='', $projectid=0, $htmlname='task_parent', $modeproject=0, $modetask=0) { global $user, $langs; @@ -248,14 +249,14 @@ class FormOther //print $modeproject.'-'.$modetask; $task=new Task($this->db); - $tasksarray=$task->getTasksArray($modetask?$user:0, $modeproject?$user:0, $selected); + $tasksarray=$task->getTasksArray($modetask?$user:0, $modeproject?$user:0, $projectid); if ($tasksarray) { print ''; } else @@ -343,7 +344,7 @@ class FormOther * @param unknown_type $lines * @param unknown_type $level */ -function PLineSelect(&$inc, $parent, $lines, $level=0) +function PLineSelect(&$inc, $parent, $lines, $level=0, $selected=0) { global $langs, $user, $conf; @@ -382,7 +383,9 @@ function PLineSelect(&$inc, $parent, $lines, $level=0) // Print task if ($lines[$i]->id > 0) { - print '