Additionnal filter on getProjectsAuthorizedForUser
with great list of projects, have more filter is a good thing
This commit is contained in:
parent
344263f53c
commit
6e83e899e2
@ -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 $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 $list 0=Return array,1=Return string list
|
||||||
* @param int $socid 0=No filter on third party, id of third party
|
* @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 ","
|
* @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();
|
$projects = array();
|
||||||
$temp = array();
|
$temp = array();
|
||||||
@ -1149,6 +1150,8 @@ class Project extends CommonObject
|
|||||||
{
|
{
|
||||||
// No filter. Use this if user has permission to see all project
|
// No filter. Use this if user has permission to see all project
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$sql.= $filter;
|
||||||
//print $sql;
|
//print $sql;
|
||||||
|
|
||||||
$resql = $this->db->query($sql);
|
$resql = $this->db->query($sql);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user