From f7daa8875250004ec374036951a507fb2efa9309 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Sun, 17 Apr 2011 22:57:12 +0000 Subject: [PATCH] Fix: limit to current entity --- htdocs/comm/action/index.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/comm/action/index.php b/htdocs/comm/action/index.php index c41cc18b3d3..1c9d1366baa 100644 --- a/htdocs/comm/action/index.php +++ b/htdocs/comm/action/index.php @@ -2,7 +2,7 @@ /* Copyright (C) 2001-2004 Rodolphe Quiedeville * Copyright (C) 2003 Eric Seigne * Copyright (C) 2004-2011 Laurent Destailleur - * Copyright (C) 2005-2010 Regis Houssin + * Copyright (C) 2005-2011 Regis Houssin * Copyright (C) 2011 Juanjo Menent * * This program is free software; you can redistribute it and/or modify @@ -255,6 +255,7 @@ $sql.= ', '.MAIN_DB_PREFIX.'user as u'; $sql.= ' WHERE a.fk_action = ca.id'; $sql.= ' AND a.fk_user_author = u.rowid'; $sql.= ' AND u.entity in (0,'.$conf->entity.')'; // To limit to entity +$sql.= ' AND a.entity = '.$conf->entity; if ($user->societe_id) $sql.= ' AND a.fk_soc = '.$user->societe_id; // To limit to external user company if ($pid) $sql.=" AND a.fk_project=".$db->escape($pid); if ($action == 'show_day')