]> git.mxchange.org Git - friendica.git/commitdiff
add webfinger to poco, if present
authorfriendica <info@friendica.com>
Sun, 18 Dec 2011 08:14:34 +0000 (00:14 -0800)
committerfriendica <info@friendica.com>
Sun, 18 Dec 2011 08:14:34 +0000 (00:14 -0800)
boot.php
mod/poco.php
view/poco_entry_xml.tpl

index c06f59be27eaaa67599a32691b5b27046997d804..3189f929ee028d1182658453a4cf0eb06c283a56 100644 (file)
--- a/boot.php
+++ b/boot.php
@@ -9,7 +9,7 @@ require_once('include/nav.php');
 require_once('include/cache.php');
 
 define ( 'FRIENDICA_PLATFORM',     'Friendica');
-define ( 'FRIENDICA_VERSION',      '2.3.1197' );
+define ( 'FRIENDICA_VERSION',      '2.3.1198' );
 define ( 'DFRN_PROTOCOL_VERSION',  '2.22'    );
 define ( 'DB_UPDATE_VERSION',      1111      );
 
index dd8df600839373ed4cb3a16e2891e7c34c0fc8bf..6efd4ab8cc395116d763b09a3bae99ca4ae98716 100644 (file)
@@ -125,8 +125,10 @@ function poco_init(&$a) {
                                        $entry['id'] = $rr['id'];
                                if($fields_ret['displayName'])
                                        $entry['displayName'] = $rr['name'];
-                               if($fields_ret['urls'])
+                               if($fields_ret['urls']) {
                                        $entry['urls'] = array(array('value' => $rr['url'], 'type' => 'profile'));
+                                       if($rr['addr'] && ($rr['network'] !== NETWORK_MAIL)
+                                               $entry['urls'][] = array('value' => 'acct:' . $rr['addr'], 'type' => 'webfinger');  
                                if($fields_ret['preferredUsername'])
                                        $entry['preferredUsername'] = $rr['nick'];
                                if($fields_ret['photos'])
index 8d55151525b2e77599d2fb598d534866266499a3..c3db9f2b27a2fbe973ae51fb02056a684a410224 100644 (file)
@@ -2,6 +2,10 @@
 {{ if $entry.id }}<id>$entry.id</id>{{ endif }}
 {{ if $entry.displayName }}<displayName>$entry.displayName</displayName>{{ endif }}
 {{ if $entry.preferredUsername }}<preferredUsername>$entry.preferredUsername</preferredUsername>{{ endif }}
-{{ if $entry.urls }}<urls><value>$entry.urls.value</value><type>$entry.urls.type</type></urls>{{ endif }}
+{{ if $entry.urls }}
+{{for $entry.urls as $url }}
+<urls><value>$url.value</value><type>$url.type</type></urls>
+{{endfor}}
+{{ endif }}
 {{ if $entry.photos }}<photos><value>$entry.photos.value</value><type>$entry.photos.type</type></photos>{{ endif }}
 </entry>