// is a real event (no bithdays).
if (local_user() && local_user() == $rr['uid'] && $rr['type'] == 'event') {
$edit = ((! $rr['cid']) ? array(System::baseUrl() . '/events/event/' . $rr['id'], t('Edit event'), '', '') : null);
+ $copy = ((! $rr['cid']) ? array(System::baseUrl() . '/events/copy/' . $rr['id'], t('Duplicate event'), '', '') : null);
$drop = array(System::baseUrl() . '/events/drop/' . $rr['id'], t('Delete event'), '', '');
}
'd' => $d,
'edit' => $edit,
'drop' => $drop,
+ 'copy' => $copy,
'is_first' => $is_first,
'item' => $rr,
'html' => $html,
// Format the event location.
$evloc = event_location2array($item['event-location']);
- $location = array(
- 'name' => prepare_text($evloc['name'])
- );
+ $location = array();
+
+ if (isset($evloc['name'])) {
+ $location['name'] = prepare_text($evloc['name']);
+ }
// Construct the map HTML.
if (isset($evloc['address'])) {
$location['map'] = '<div class="map">' . generate_named_map($evloc['address']) . '</div>';