aboutsummaryrefslogtreecommitdiffstats
path: root/include/items.php
diff options
context:
space:
mode:
authorMike Macgirvin <mike@macgirvin.com>2010-10-19 20:52:05 -0700
committerMike Macgirvin <mike@macgirvin.com>2010-10-19 20:52:05 -0700
commita8e4ec7801b5ca8c986febed1f95124b412e92f9 (patch)
tree02dde668c26d5b932997139537c99de9ca7242ea /include/items.php
parent81835acc36f17939b9e202cec2ff8981ca03536b (diff)
downloadvolse-hubzilla-a8e4ec7801b5ca8c986febed1f95124b412e92f9.tar.gz
volse-hubzilla-a8e4ec7801b5ca8c986febed1f95124b412e92f9.tar.bz2
volse-hubzilla-a8e4ec7801b5ca8c986febed1f95124b412e92f9.zip
use browser geolocation when desired
Diffstat (limited to 'include/items.php')
-rw-r--r--include/items.php8
1 files changed, 7 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);