Skip to content
Snippets Groups Projects
Commit fe8ddda3 authored by Laurent Destailleur's avatar Laurent Destailleur
Browse files

Fix: Bad filter

parent 97f15dde
No related branches found
No related tags found
No related merge requests found
......@@ -594,7 +594,7 @@ function clean_orphelins($db)
*
* @param $db
* @param $socid
* @param $projectsListId
* @param $projectsListId Id of project i have permission on
* @param $mytasks Limited to task i am contact to
*/
function print_projecttasks_array($db, $socid, $projectsListId, $mytasks=0)
......@@ -628,8 +628,7 @@ function print_projecttasks_array($db, $socid, $projectsListId, $mytasks=0)
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."projet_task as t ON p.rowid = t.fk_projet";
}
$sql.= " WHERE p.entity = ".$conf->entity;
if (! $user->rights->projet->all->lire) $sql.= " AND p.rowid IN (".$projectsListId.")";
//if ($socid || ! $user->rights->societe->client->voir) $sql.= " AND (p.fk_soc IS NULL OR p.fk_soc = 0 OR p.fk_soc = ".$socid.")";
$sql.= " AND p.rowid IN (".$projectsListId.")";
if ($socid) $sql.= " AND (p.fk_soc IS NULL OR p.fk_soc = 0 OR p.fk_soc = ".$socid.")";
if ($mytasks)
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment