diff options
author | Tobias Diekershoff <tobias.diekershoff@gmx.net> | 2011-06-14 08:10:38 +0200 |
---|---|---|
committer | Tobias Diekershoff <tobias.diekershoff@gmx.net> | 2011-06-14 08:10:38 +0200 |
commit | d08b068031f01e1bcf57a46b9e7dfcb217b6fb30 (patch) | |
tree | fc700a19369cb7cc2d84966c042a6ef55db10983 /include/items.php | |
parent | 4d3c6941cafb3b8a7e1d2ccccd5003a2dc468a4d (diff) | |
parent | 9b9bd35cba293b86c871c2cfbe15e6d9c4673a7d (diff) | |
download | volse-hubzilla-d08b068031f01e1bcf57a46b9e7dfcb217b6fb30.tar.gz volse-hubzilla-d08b068031f01e1bcf57a46b9e7dfcb217b6fb30.tar.bz2 volse-hubzilla-d08b068031f01e1bcf57a46b9e7dfcb217b6fb30.zip |
Merge branch 'master' of git://github.com/friendika/friendika
Diffstat (limited to 'include/items.php')
-rw-r--r-- | include/items.php | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/include/items.php b/include/items.php index db500fda2..dc177c468 100644 --- a/include/items.php +++ b/include/items.php @@ -1337,14 +1337,22 @@ function consume_feed($xml,$importer,&$contact, &$hub, $datedir = 0, $secure_fee if((x($datarray,'object-type')) && ($datarray['object-type'] === ACTIVITY_OBJ_EVENT)) { $ev = bbtoevent($datarray['body']); if(x($ev,'desc') && x($ev,'start')) { + $ev['uid'] = $importer['uid']; + $ev['uri'] = $item_id; + + if(is_array($contact)) + $ev['cid'] = $contact['id']; $r = q("SELECT * FROM `event` WHERE `uri` = '%s' AND `uid` = %d LIMIT 1", dbesc($item_id), intval($importer['uid']) ); - // import/update event - + if(count($r)) + $ev['id'] = $r[0]['id']; + $xyz = event_store($ev); + continue; } } + $r = q("SELECT `uid`, `last-child`, `edited`, `body` FROM `item` WHERE `uri` = '%s' AND `uid` = %d LIMIT 1", dbesc($item_id), intval($importer['uid']) |