diff --git a/htdocs/projet/class/project.class.php b/htdocs/projet/class/project.class.php index 6a7b130ac0d..c434fa65381 100644 --- a/htdocs/projet/class/project.class.php +++ b/htdocs/projet/class/project.class.php @@ -1095,9 +1095,10 @@ class Project extends CommonObject * @param int $mode 0=All project I have permission on (assigned to me and public), 1=Projects assigned to me only, 2=Will return list of all projects with no test on contacts * @param int $list 0=Return array,1=Return string list * @param int $socid 0=No filter on third party, id of third party + * @param string $filter additionnal filter on project (statut, ref, ...) * @return array or string Array of projects id, or string with projects id separated with "," */ - function getProjectsAuthorizedForUser($user, $mode=0, $list=0, $socid=0) + function getProjectsAuthorizedForUser($user, $mode=0, $list=0, $socid=0, $filter='') { $projects = array(); $temp = array(); @@ -1149,6 +1150,8 @@ class Project extends CommonObject { // No filter. Use this if user has permission to see all project } + + $sql.= $filter; //print $sql; $resql = $this->db->query($sql);