From a9d7acda279ebb7f2b3cd61a91a5e1d8b590dcf2 Mon Sep 17 00:00:00 2001 From: redmatrix Date: Wed, 1 Jun 2016 21:48:54 -0700 Subject: the rest of the schema updates - WARNING: some third party plugins may fail; e.g. embedphotos and chess. $item['object'] is now $item['obj'] and $photo['type'] is $photo['mimetype'], $photo['scale'] is $photo['imgscale'] and $photo['data'] is now $photo['content']. There are a number of other changes, but these are the ones noted to cause issues with third-party plugins. The project plugins have been updated. Please note any new issues as this effort touched a lot of code in a lot of files. --- include/feedutils.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'include/feedutils.php') diff --git a/include/feedutils.php b/include/feedutils.php index fb938cfdd..685b2f982 100644 --- a/include/feedutils.php +++ b/include/feedutils.php @@ -144,9 +144,9 @@ function construct_verb($item) { function construct_activity_object($item) { - if($item['object']) { + if($item['obj']) { $o = '' . "\r\n"; - $r = json_decode($item['object'],false); + $r = json_decode($item['obj'],false); if(! $r) return ''; @@ -582,7 +582,7 @@ function get_atom_elements($feed, $item, &$author) { $obj['content'] = $body; } - $res['object'] = $obj; + $res['obj'] = $obj; } $rawobj = $item->get_item_tags(NAMESPACE_ACTIVITY, 'target'); @@ -1163,12 +1163,12 @@ function atom_entry($item,$type,$author,$owner,$comment = false,$cid = 0) { } if(activity_match($item['obj_type'],ACTIVITY_OBJ_EVENT) && activity_match($item['verb'],ACTIVITY_POST)) { - $obj = ((is_array($item['obj'])) ? $item['object'] : json_decode($item['object'],true)); + $obj = ((is_array($item['obj'])) ? $item['obj'] : json_decode($item['obj'],true)); $o .= '' . xmlify($item['title']) . '' . "\r\n"; $o .= '' . xmlify(bbcode($obj['title'])) . '' . "\r\n"; - $o .= '' . datetime_convert('UTC','UTC', $obj['start'],'Ymd\\THis' . (($obj['adjust']) ? '\\Z' : '')) . '' . "\r\n"; - $o .= '' . datetime_convert('UTC','UTC', $obj['finish'],'Ymd\\THis' . (($obj['adjust']) ? '\\Z' : '')) . '' . "\r\n"; + $o .= '' . datetime_convert('UTC','UTC', $obj['dtstart'],'Ymd\\THis' . (($obj['adjust']) ? '\\Z' : '')) . '' . "\r\n"; + $o .= '' . datetime_convert('UTC','UTC', $obj['dtend'],'Ymd\\THis' . (($obj['adjust']) ? '\\Z' : '')) . '' . "\r\n"; $o .= '' . xmlify(bbcode($obj['location'])) . '' . "\r\n"; $o .= '' . xmlify(bbcode($obj['description'])) . '' . "\r\n"; } -- cgit v1.2.3