diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/items.php | 8 | ||||
-rw-r--r-- | include/notifier.php | 3 |
2 files changed, 10 insertions, 1 deletions
diff --git a/include/items.php b/include/items.php index 87e5b46ef..f04bf0bd8 100644 --- a/include/items.php +++ b/include/items.php @@ -199,8 +199,9 @@ function get_feed_for(&$a, $dfrn_id, $owner_id, $last_update, $direction = 0) { '$published' => xmlify(datetime_convert('UTC', 'UTC', $item['created'] . '+00:00' , ATOM_TIME)), '$updated' => xmlify(datetime_convert('UTC', 'UTC', $item['edited'] . '+00:00' , ATOM_TIME)), '$location' => xmlify($item['location']), + '$coord' => xmlify($item['coord']), '$type' => $type, - '$alt' => xmlify($a->get_baseurl() . '/display/' . $owner_nick . '/' . $item['id']), + '$alt' => xmlify($a->get_baseurl() . '/display/' . $owner_nick . '/' . $item['id']), '$content' => xmlify($item['body']), '$verb' => xmlify($verb), '$actobj' => $actobj, // do not xmlify @@ -355,6 +356,10 @@ function get_atom_elements($item) { elseif($rawowner[0]['child'][NAMESPACE_DFRN]['avatar'][0]['data']) $res['owner-avatar'] = unxmlify($rawowner[0]['child'][NAMESPACE_DFRN]['avatar'][0]['data']); + $rawgeo = $item->get_item_tags(NAMESPACE_GEORSS,'point'); + if($rawgeo) + $res['coord'] = unxmlify($rawgeo[0]['data']); + $rawverb = $item->get_item_tags(NAMESPACE_ACTIVITY, 'verb'); // select between supported verbs if($rawverb) @@ -429,6 +434,7 @@ function item_store($arr) { $arr['changed'] = datetime_convert(); $arr['title'] = notags(trim($arr['title'])); $arr['location'] = notags(trim($arr['location'])); + $arr['coord'] = notags(trim($arr['coord'])); $arr['body'] = escape_tags(trim($arr['body'])); $arr['last-child'] = intval($arr['last-child']); $arr['visible'] = ((x($arr,'visible') !== false) ? intval($arr['visible']) : 1); diff --git a/include/notifier.php b/include/notifier.php index db95c3aae..99b385996 100644 --- a/include/notifier.php +++ b/include/notifier.php @@ -209,6 +209,7 @@ '$published' => xmlify(datetime_convert('UTC', 'UTC', $item['created'] . '+00:00' , ATOM_TIME)), '$updated' => xmlify(datetime_convert('UTC', 'UTC', $item['edited'] . '+00:00' , ATOM_TIME)), '$location' => xmlify($item['location']), + '$coord' => xmlify($item['coord']), '$type' => 'text', '$verb' => xmlify($verb), '$actobj' => $actobj, @@ -249,6 +250,7 @@ '$published' => xmlify(datetime_convert('UTC', 'UTC', $item['created'] . '+00:00' , ATOM_TIME)), '$updated' => xmlify(datetime_convert('UTC', 'UTC', $item['edited'] . '+00:00' , ATOM_TIME)), '$location' => xmlify($item['location']), + '$coord' => xmlify($item['coord']), '$type' => 'text', '$verb' => xmlify($verb), '$actobj' => $actobj, @@ -269,6 +271,7 @@ '$content' => xmlify($item['body']), '$alt' => xmlify($a->get_baseurl() . '/display/' . $owner['nickname'] . '/' . $item['id']), '$location' => xmlify($item['location']), + '$coord' => xmlify($item['coord']), '$type' => 'text', '$verb' => xmlify($verb), '$actobj' => $actobj, |