From: Michael Vogel Date: Fri, 16 Oct 2015 21:50:34 +0000 (+0200) Subject: Unsure to store the guid with new events X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=fcc185a18261f5ae2addeb80bf32e3a9b69ca5ce;p=friendica.git Unsure to store the guid with new events --- diff --git a/include/event.php b/include/event.php index fedbe24468..a87dba64fb 100644 --- a/include/event.php +++ b/include/event.php @@ -21,33 +21,33 @@ function format_event_html($ev) { $o .= '

' . t('Starts:') . ' ' - . (($ev['adjust']) ? day_translate(datetime_convert('UTC', date_default_timezone_get(), + . '" >' + . (($ev['adjust']) ? day_translate(datetime_convert('UTC', date_default_timezone_get(), $ev['start'] , $bd_format )) - : day_translate(datetime_convert('UTC', 'UTC', + : day_translate(datetime_convert('UTC', 'UTC', $ev['start'] , $bd_format))) . '

' . "\r\n"; if(! $ev['nofinish']) $o .= '

' . t('Finishes:') . ' ' - . (($ev['adjust']) ? day_translate(datetime_convert('UTC', date_default_timezone_get(), + . '" >' + . (($ev['adjust']) ? day_translate(datetime_convert('UTC', date_default_timezone_get(), $ev['finish'] , $bd_format )) - : day_translate(datetime_convert('UTC', 'UTC', + : day_translate(datetime_convert('UTC', 'UTC', $ev['finish'] , $bd_format ))) . '

' . "\r\n"; if(strlen($ev['location'])){ - $o .= '

' . t('Location:') . ' ' - . bbcode($ev['location']) + $o .= '

' . t('Location:') . ' ' + . bbcode($ev['location']) . '

' . "\r\n"; - + if (strpos($ev['location'], "[map")===False) { $map = generate_named_map($ev['location']); if ($map!==$ev['location']) $o.=$map; } - + } $o .= '' . "\r\n"; @@ -137,7 +137,7 @@ function format_event_bbcode($ev) { if(($ev['finish']) && (! $ev['nofinish'])) $o .= '[event-finish]' . $ev['finish'] . '[/event-finish]'; - + if($ev['location']) $o .= '[event-location]' . $ev['location'] . '[/event-location]'; @@ -200,7 +200,7 @@ function ev_compare($a,$b) { if($date_a === $date_b) return strcasecmp($a['desc'],$b['desc']); - + return strcmp($date_a,$date_b); } @@ -324,7 +324,7 @@ function event_store($arr) { } else { - // New event. Store it. + // New event. Store it. $r = q("INSERT INTO `event` ( `uid`,`cid`,`uri`,`created`,`edited`,`start`,`finish`,`summary`, `desc`,`location`,`type`, `adjust`,`nofinish`,`allow_cid`,`allow_gid`,`deny_cid`,`deny_gid`) @@ -362,6 +362,7 @@ function event_store($arr) { $item_arr['contact-id'] = $arr['cid']; $item_arr['uri'] = $arr['uri']; $item_arr['parent-uri'] = $arr['uri']; + $item_arr['guid'] = $arr['guid']; $item_arr['type'] = 'activity'; $item_arr['wall'] = (($arr['cid']) ? 0 : 1); $item_arr['contact-id'] = $contact['id']; diff --git a/include/items.php b/include/items.php index 4e86a5200a..c14fcdcc99 100644 --- a/include/items.php +++ b/include/items.php @@ -2854,6 +2854,7 @@ function consume_feed($xml,$importer,&$contact, &$hub, $datedir = 0, $pass = 0) $ev['uri'] = $item_id; $ev['edited'] = $datarray['edited']; $ev['private'] = $datarray['private']; + $ev['guid'] = $datarray['guid']; if(is_array($contact)) $ev['cid'] = $contact['id']; @@ -4079,6 +4080,7 @@ function local_delivery($importer,$data) { $ev['uri'] = $item_id; $ev['edited'] = $datarray['edited']; $ev['private'] = $datarray['private']; + $ev['guid'] = $datarray['guid']; $r = q("SELECT * FROM `event` WHERE `uri` = '%s' AND `uid` = %d LIMIT 1", dbesc($item_id),