Fix: Opening agenda for a specific day
Fix: No picto of thirdparty of contact if link is broken
This commit is contained in:
parent
6bfc0d14b2
commit
2bc579324d
@ -73,8 +73,10 @@ $hookmanager->initHooks(array('actioncard'));
|
||||
|
||||
|
||||
/*
|
||||
* Action creation de l'action
|
||||
* Actions
|
||||
*/
|
||||
|
||||
// Add action
|
||||
if ($action == 'add_action')
|
||||
{
|
||||
$error=0;
|
||||
|
||||
@ -78,7 +78,7 @@ $type=GETPOST("type");
|
||||
$maxprint=(isset($_GET["maxprint"])?GETPOST("maxprint"):$conf->global->AGENDA_MAX_EVENTS_DAY_VIEW);
|
||||
$actioncode=GETPOST("actioncode","alpha",3)?GETPOST("actioncode","alpha",3):(GETPOST("actioncode")=="0"?'':(empty($conf->global->AGENDA_USE_EVENT_TYPE)?'AC_OTH':''));
|
||||
|
||||
if (GETPOST('viewcal')) {
|
||||
if (GETPOST('viewcal') && $action != 'show_day' && $action != 'show_week') {
|
||||
$action='show_month'; $day='';
|
||||
} // View by month
|
||||
if (GETPOST('viewweek')) {
|
||||
@ -1134,7 +1134,7 @@ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventa
|
||||
$cachethirdparties[$event->societe->id]=$thirdparty;
|
||||
}
|
||||
else $thirdparty=$cachethirdparties[$event->societe->id];
|
||||
$linerelatedto.=$thirdparty->getNomUrl(1,'',$length);
|
||||
if (! empty($thirdparty->id)) $linerelatedto.=$thirdparty->getNomUrl(1,'',$length);
|
||||
}
|
||||
if (! empty($event->contact->id) && $event->contact->id > 0)
|
||||
{
|
||||
@ -1146,7 +1146,7 @@ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventa
|
||||
}
|
||||
else $contact=$cachecontacts[$event->contact->id];
|
||||
if ($linerelatedto) $linerelatedto.=' / ';
|
||||
$linerelatedto.=$contact->getNomUrl(1,'',$length);
|
||||
if (! empty($contact->id)) $linerelatedto.=$contact->getNomUrl(1,'',$length);
|
||||
}
|
||||
if ($linerelatedto) print '<br>'.$linerelatedto;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user