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

Fix: Bad cache management

parent 12340087
Branches
Tags
No related merge requests found
...@@ -760,6 +760,7 @@ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventa ...@@ -760,6 +760,7 @@ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventa
$thirdparty->fetch($event->societe->id); $thirdparty->fetch($event->societe->id);
$cachethirdparties[$event->societe->id]=$thirdparty; $cachethirdparties[$event->societe->id]=$thirdparty;
} }
else $thirdparty=$cachethirdparties[$event->societe->id];
$linerelatedto.=$thirdparty->getNomUrl(1,'',$length); $linerelatedto.=$thirdparty->getNomUrl(1,'',$length);
} }
if (! empty($event->contact->id)) if (! empty($event->contact->id))
...@@ -768,8 +769,9 @@ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventa ...@@ -768,8 +769,9 @@ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventa
{ {
$contact=new Contact($db); $contact=new Contact($db);
$contact->fetch($event->contact->id); $contact->fetch($event->contact->id);
$cachecontacts[$event->contact->id]=$thirdparty; $cachecontacts[$event->contact->id]=$contact;
} }
else $contact=$cachecontacts[$event->contact->id];
if ($linerelatedto) $linerelatedto.=' / '; if ($linerelatedto) $linerelatedto.=' / ';
$linerelatedto.=$contact->getNomUrl(1,'',$length); $linerelatedto.=$contact->getNomUrl(1,'',$length);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment