X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=include%2Fevent.php;h=229aa8cd460f52e9c1373a6518bb248dfbecc661;hb=143e7fc6b707f377d383a498999ce712d04dd102;hp=ca957d0482d4a78d497b44a1c396160d797e3348;hpb=541d6ab8959fe3c069996e230def126c154da34d;p=friendica.git diff --git a/include/event.php b/include/event.php index ca957d0482..229aa8cd46 100644 --- a/include/event.php +++ b/include/event.php @@ -627,6 +627,7 @@ function process_events($arr) { // 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'), '', ''); } @@ -650,6 +651,7 @@ function process_events($arr) { 'd' => $d, 'edit' => $edit, 'drop' => $drop, + 'copy' => $copy, 'is_first' => $is_first, 'item' => $rr, 'html' => $html, @@ -957,9 +959,11 @@ function format_event_item($item) { // 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'] = '
' . generate_named_map($evloc['address']) . '
';