diff options
author | friendica <info@friendica.com> | 2011-12-18 00:14:34 -0800 |
---|---|---|
committer | friendica <info@friendica.com> | 2011-12-18 00:14:34 -0800 |
commit | 978717a2475bbd25d61969e9448dc6f197c8d637 (patch) | |
tree | 916b91ef3cefe6db0ba0482da51279c617600623 | |
parent | 22d59350e958e24cc3b7c49ce8ceae2e3178576e (diff) | |
download | volse-hubzilla-978717a2475bbd25d61969e9448dc6f197c8d637.tar.gz volse-hubzilla-978717a2475bbd25d61969e9448dc6f197c8d637.tar.bz2 volse-hubzilla-978717a2475bbd25d61969e9448dc6f197c8d637.zip |
add webfinger to poco, if present
-rw-r--r-- | boot.php | 2 | ||||
-rw-r--r-- | mod/poco.php | 4 | ||||
-rw-r--r-- | view/poco_entry_xml.tpl | 6 |
3 files changed, 9 insertions, 3 deletions
@@ -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 ); diff --git a/mod/poco.php b/mod/poco.php index dd8df6008..6efd4ab8c 100644 --- a/mod/poco.php +++ b/mod/poco.php @@ -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']) diff --git a/view/poco_entry_xml.tpl b/view/poco_entry_xml.tpl index 8d5515152..c3db9f2b2 100644 --- a/view/poco_entry_xml.tpl +++ b/view/poco_entry_xml.tpl @@ -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> |