]> git.mxchange.org Git - friendica.git/commitdiff
API: update template for friendica:owner data
authorfabrixxm <fabrix.xm@gmail.com>
Wed, 13 Jul 2016 18:11:18 +0000 (20:11 +0200)
committerfabrixxm <fabrix.xm@gmail.com>
Wed, 13 Jul 2016 18:11:18 +0000 (20:11 +0200)
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
view/templates/api_timeline_xml.tpl
view/templates/api_user_xml.tpl

index 6520415a772da265e8aa39b4617dd6ea6be64942..4c9f7e6287bacdac2af157b2f9f80ac9aea24123 100644 (file)
@@ -1,8 +1,6 @@
-
-<!-- TEMPLATE APPEARS UNUSED -->
-
+{{* used in include/api.php 'api_statuses_friends' and 'api_statuses_followers' *}}
 <users type="array">
        {{foreach $users as $u}}
-       {{include file="api_user_xml.tpl" user=$u}}
+       <user>{{include file="api_user_xml.tpl" user=$u}}</user>
        {{/foreach}}
 </users>
index e22c1e2ee587cdf6e167da023d6599501eae8979..2579331495fd5f7611adec8ae7f91d5d1bb34ea3 100644 (file)
@@ -13,7 +13,9 @@
   <in_reply_to_screen_name>{{$status.in_reply_to_screen_name}}</in_reply_to_screen_name>
   <geo>{{$status.geo}}</geo>
   <favorited>{{$status.favorited}}</favorited>
-{{include file="api_user_xml.tpl" user=$status.user}}  <statusnet:html>{{$status.statusnet_html}}</statusnet:html>
+       <user>{{include file="api_user_xml.tpl" user=$status.user}}</user>
+       <friendica:owner>{{include file="api_user_xml.tpl" user=$status.friendica_owner}}</friendica:owner>
+  <statusnet:html>{{$status.statusnet_html}}</statusnet:html>
   <statusnet:conversation_id>{{$status.statusnet_conversation_id}}</statusnet:conversation_id>
   <url>{{$status.url}}</url>
   <coordinates>{{$status.coordinates}}</coordinates>
index 7e0ec6ed63c27148aabe56f511c6f5326dfbfdc3..698c5436dd8a9b0184341dc291ae69f2c4ab20a2 100644 (file)
@@ -1,5 +1,5 @@
+{{* includer template MUST provide root element *}}
 
-  <user>
    <id>{{$user.id}}</id>
    <name>{{$user.name}}</name>
    <screen_name>{{$user.screen_name}}</screen_name>
@@ -44,4 +44,4 @@
     <place>{{$user.status.place}}</place>
     <contributors>{{$user.status.contributors}}</contributors>
   {{/if}}</status>
-  </user>
+