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

Memory optimisation

Add number of other events not shown in calendar for each day
parent 4b8786fd
No related branches found
No related tags found
No related merge requests found
......@@ -509,8 +509,7 @@ function show_day_events($db, $day, $month, $year, $style, $actionarray, $maxPri
//$curtime = dolibarr_mktime (0, 0, 0, $month, $day, $year);
$i=0;
$ok=true;
foreach ($actionarray as $daykey => $notused)
{
$annee = date('Y',$daykey);
......@@ -520,7 +519,6 @@ function show_day_events($db, $day, $month, $year, $style, $actionarray, $maxPri
{
foreach ($actionarray[$daykey] as $index => $action)
{
if ($i < $maxPrint || $maxPrint == 0)
{
$ponct=($action->date_start_in_calendar == $action->date_end_in_calendar);
......@@ -579,12 +577,16 @@ function show_day_events($db, $day, $month, $year, $style, $actionarray, $maxPri
print '</td></tr></table>';
$i++;
}
else if($ok)
else
{
print '<a href="'.DOL_URL_ROOT.'/comm/action/index.php?action=maxPrint&month='.$month.'&year='.$year.'">'.img_picto("all","1downarrow_selected.png").' ...</a>';
$ok=false;
print '<a href="'.DOL_URL_ROOT.'/comm/action/index.php?action=maxPrint&month='.$month.'&year='.$year.'">'.img_picto("all","1downarrow_selected.png").' ...';
print ' +'.(sizeof($actionarray[$daykey])-$maxPrint);
print '</a>';
break;
//$ok=false; // To avoid to show twice the link
}
}
break;
}
}
if (! $i) print '&nbsp;';
......
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