From d98ab84d76891ef7739f5a5daf414467a1096689 Mon Sep 17 00:00:00 2001 From: fabrixxm Date: Wed, 13 Jul 2016 20:11:18 +0200 Subject: [PATCH] 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. --- view/templates/api_friends_xml.tpl | 6 ++---- view/templates/api_timeline_xml.tpl | 4 +++- view/templates/api_user_xml.tpl | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/view/templates/api_friends_xml.tpl b/view/templates/api_friends_xml.tpl index 6520415a7..4c9f7e628 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 e22c1e2ee..257933149 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 7e0ec6ed6..698c5436d 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}} - +