Fix: Opening agenda for a specific day

Fix: No picto of thirdparty of contact if link is broken
This commit is contained in:
Laurent Destailleur 2013-09-25 21:26:06 +02:00
parent 6bfc0d14b2
commit 2bc579324d
2 changed files with 6 additions and 4 deletions

View File

@ -73,8 +73,10 @@ $hookmanager->initHooks(array('actioncard'));
/*
* Action creation de l'action
* Actions
*/
// Add action
if ($action == 'add_action')
{
$error=0;

View File

@ -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;
}