From: fabrixxm Date: Wed, 13 Jul 2016 18:11:18 +0000 (+0200) Subject: API: update template for friendica:owner data X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=d98ab84d76891ef7739f5a5daf414467a1096689;p=friendica.git API: update template for friendica:owner data api_user_xml.tpl lost his root element. Includer templates must provide it. This allow to use same data structure under different root tag. --- diff --git a/view/templates/api_friends_xml.tpl b/view/templates/api_friends_xml.tpl index 6520415a77..4c9f7e6287 100644 --- a/view/templates/api_friends_xml.tpl +++ b/view/templates/api_friends_xml.tpl @@ -1,8 +1,6 @@ - - - +{{* used in include/api.php 'api_statuses_friends' and 'api_statuses_followers' *}} {{foreach $users as $u}} - {{include file="api_user_xml.tpl" user=$u}} + {{include file="api_user_xml.tpl" user=$u}} {{/foreach}} diff --git a/view/templates/api_timeline_xml.tpl b/view/templates/api_timeline_xml.tpl index e22c1e2ee5..2579331495 100644 --- a/view/templates/api_timeline_xml.tpl +++ b/view/templates/api_timeline_xml.tpl @@ -13,7 +13,9 @@ {{$status.in_reply_to_screen_name}} {{$status.geo}} {{$status.favorited}} -{{include file="api_user_xml.tpl" user=$status.user}} {{$status.statusnet_html}} + {{include file="api_user_xml.tpl" user=$status.user}} + {{include file="api_user_xml.tpl" user=$status.friendica_owner}} + {{$status.statusnet_html}} {{$status.statusnet_conversation_id}} {{$status.url}} {{$status.coordinates}} diff --git a/view/templates/api_user_xml.tpl b/view/templates/api_user_xml.tpl index 7e0ec6ed63..698c5436dd 100644 --- a/view/templates/api_user_xml.tpl +++ b/view/templates/api_user_xml.tpl @@ -1,5 +1,5 @@ +{{* includer template MUST provide root element *}} - {{$user.id}} {{$user.name}} {{$user.screen_name}} @@ -44,4 +44,4 @@ {{$user.status.place}} {{$user.status.contributors}} {{/if}} - +