aboutsummaryrefslogtreecommitdiffstats
path: root/mod/xrd.php
diff options
context:
space:
mode:
authorFabio Comuni <fabrix.xm@gmail.com>2011-07-20 10:01:12 +0200
committerFabio Comuni <fabrix.xm@gmail.com>2011-07-20 10:01:12 +0200
commit020deefba613327a1d8875ba7f2cf9a750be42dd (patch)
treef5989c7f45b512c81cc4bec025e7c7137419d516 /mod/xrd.php
parent1c9ed08620578bebc8af16e003a2ecef2b8a1f37 (diff)
parentb27d68633be6219c3f65d830178e3dc96c1c91e9 (diff)
downloadvolse-hubzilla-020deefba613327a1d8875ba7f2cf9a750be42dd.tar.gz
volse-hubzilla-020deefba613327a1d8875ba7f2cf9a750be42dd.tar.bz2
volse-hubzilla-020deefba613327a1d8875ba7f2cf9a750be42dd.zip
Merge remote-tracking branch 'friendika/master' into newacl
Diffstat (limited to 'mod/xrd.php')
-rw-r--r--mod/xrd.php15
1 files changed, 15 insertions, 0 deletions
diff --git a/mod/xrd.php b/mod/xrd.php
index de0c20ea5..accc2f68e 100644
--- a/mod/xrd.php
+++ b/mod/xrd.php
@@ -27,6 +27,20 @@ function xrd_content(&$a) {
header('Access-Control-Allow-Origin: *');
header("Content-type: text/xml");
+ $dspr_enabled = get_config('system','diaspora_enabled');
+
+ if($dspr_enabled) {
+ $tpl = file_get_contents('view/xrd_diaspora.tpl');
+ $dspr = replace_macros($tpl,array(
+ '$baseurl' => $a->get_baseurl(),
+ '$dspr_guid' => $r[0]['guid'],
+ '$dspr_key' => base64_encode($r[0]['pubkey'])
+ ));
+ }
+ else
+ $dspr = '';
+
+
$tpl = file_get_contents('view/xrd_person.tpl');
$o = replace_macros($tpl, array(
@@ -34,6 +48,7 @@ function xrd_content(&$a) {
'$profile_url' => $a->get_baseurl() . '/profile/' . $r[0]['nickname'],
'$atom' => $a->get_baseurl() . '/dfrn_poll/' . $r[0]['nickname'],
'$photo' => $a->get_baseurl() . '/photo/profile/' . $r[0]['uid'] . '.jpg',
+ '$dspr' => $dspr,
'$salmon' => $a->get_baseurl() . '/salmon/' . $r[0]['nickname'],
'$salmen' => $a->get_baseurl() . '/salmon/' . $r[0]['nickname'] . '/mention',
'$modexp' => 'data:application/magic-public-key,' . $salmon_key