diff --git a/htdocs/comm/action/list.php b/htdocs/comm/action/list.php index 8e41e1d4c69..227bae4e700 100644 --- a/htdocs/comm/action/list.php +++ b/htdocs/comm/action/list.php @@ -432,7 +432,7 @@ if ($usergroup > 0) { $sql .= " DISTINCT"; } $sql .= " s.nom as societe, s.rowid as socid, s.client, s.email as socemail,"; -$sql .= " a.id, a.code, a.label, a.note, a.datep as dp, a.datep2 as dp2, a.fulldayevent, a.location,"; +$sql .= " a.id, a.code, a.label, a.note, a.datep as dp, a.datep2 as dp2, a.fulldayevent, a.location, a.entity,"; $sql .= " a.fk_user_author, a.fk_user_action,"; $sql .= " a.fk_contact, a.note, a.percent as percent,"; $sql .= " a.fk_element, a.elementtype, a.datec, a.tms as datem,"; diff --git a/htdocs/comm/action/peruser.php b/htdocs/comm/action/peruser.php index 15547507ffe..3a606119be3 100644 --- a/htdocs/comm/action/peruser.php +++ b/htdocs/comm/action/peruser.php @@ -2255,10 +2255,10 @@ function show_day_events2($username, $day, $month, $year, $monthshown, $style, & $style1 .= 'peruser_busy '; } foreach ($cases1[$h] as $id => $ev) { - if ($ev['busy']) { + if (!empty($ev['busy'])) { $style1 = 'onclickopenref peruser_busy'; } - if ($ev['css']) { + if (!empty($ev['css'])) { $style1 .= ' '.$ev['css']; } } @@ -2275,10 +2275,10 @@ function show_day_events2($username, $day, $month, $year, $monthshown, $style, & $style2 .= 'peruser_busy '; } foreach ($cases2[$h] as $id => $ev) { - if ($ev['busy']) { + if (!empty($ev['busy'])) { $style2 = 'onclickopenref peruser_busy'; } - if ($ev['css']) { + if (!empty($ev['css'])) { $style2 .= ' '.$ev['css']; } } @@ -2295,10 +2295,10 @@ function show_day_events2($username, $day, $month, $year, $monthshown, $style, & $style3 .= 'peruser_busy '; } foreach ($cases3[$h] as $id => $ev) { - if ($ev['busy']) { + if (!empty($ev['busy'])) { $style3 = 'onclickopenref peruser_busy'; } - if ($ev['css']) { + if (!empty($ev['css'])) { $style3 .= ' '.$ev['css']; } } @@ -2315,10 +2315,10 @@ function show_day_events2($username, $day, $month, $year, $monthshown, $style, & $style4 .= 'peruser_busy '; } foreach ($cases4[$h] as $id => $ev) { - if ($ev['busy']) { + if (!empty($ev['busy'])) { $style4 = 'onclickopenref peruser_busy'; } - if ($ev['css']) { + if (!empty($ev['css'])) { $style4 .= ' '.$ev['css']; } } diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 7d6bd6598e5..eaf87871a67 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -15079,12 +15079,12 @@ function show_actions_messaging($conf, $langs, $db, $filterobj, $objcon = null, if (isset($histo[$key]['socpeopleassigned']) && is_array($histo[$key]['socpeopleassigned']) && count($histo[$key]['socpeopleassigned']) > 0) { $contactList = ''; foreach ($histo[$key]['socpeopleassigned'] as $cid => $Tab) { - if (empty($conf->cache['contact'][$histo[$key]['contact_id']])) { + if (empty($conf->cache['contact'][$cid])) { $contact = new Contact($db); $contact->fetch($cid); - $conf->cache['contact'][$histo[$key]['contact_id']] = $contact; + $conf->cache['contact'][$cid] = $contact; } else { - $contact = $conf->cache['contact'][$histo[$key]['contact_id']]; + $contact = $conf->cache['contact'][$cid]; } if ($contact) {