aboutsummaryrefslogtreecommitdiffstats
path: root/mod/xrd.php
diff options
context:
space:
mode:
authorfabrixxm <fabrix.xm@gmail.com>2011-08-17 17:35:37 +0200
committerfabrixxm <fabrix.xm@gmail.com>2011-08-17 17:35:37 +0200
commitbdf42473a0341f291cd256323d122aa80bb0cb0b (patch)
tree922a5ba24a34d7ea89673019e82f68436edb7091 /mod/xrd.php
parent6c423feed2d8bc5bd36d2a1cbac073915e523749 (diff)
parentdb03b1ab173d61b1ee75271dac1e48f3475ad42c (diff)
downloadvolse-hubzilla-bdf42473a0341f291cd256323d122aa80bb0cb0b.tar.gz
volse-hubzilla-bdf42473a0341f291cd256323d122aa80bb0cb0b.tar.bz2
volse-hubzilla-bdf42473a0341f291cd256323d122aa80bb0cb0b.zip
Merge remote-tracking branch 'friendika/master' into newui
Diffstat (limited to 'mod/xrd.php')
-rw-r--r--mod/xrd.php14
1 files changed, 6 insertions, 8 deletions
diff --git a/mod/xrd.php b/mod/xrd.php
index accc2f68e..fcec74336 100644
--- a/mod/xrd.php
+++ b/mod/xrd.php
@@ -1,8 +1,8 @@
<?php
-require_once('salmon.php');
+require_once('include/crypto.php');
-function xrd_content(&$a) {
+function xrd_init(&$a) {
$uri = urldecode(notags(trim($_GET['uri'])));
@@ -27,25 +27,23 @@ function xrd_content(&$a) {
header('Access-Control-Allow-Origin: *');
header("Content-type: text/xml");
- $dspr_enabled = get_config('system','diaspora_enabled');
-
- if($dspr_enabled) {
+ if(get_config('system','diaspora_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'])
+ '$dspr_key' => base64_encode(pemtorsa($r[0]['pubkey']))
));
}
else
$dspr = '';
-
$tpl = file_get_contents('view/xrd_person.tpl');
$o = replace_macros($tpl, array(
'$accturi' => $uri,
'$profile_url' => $a->get_baseurl() . '/profile/' . $r[0]['nickname'],
+ '$hcard_url' => $a->get_baseurl() . '/hcard/' . $r[0]['nickname'],
'$atom' => $a->get_baseurl() . '/dfrn_poll/' . $r[0]['nickname'],
'$photo' => $a->get_baseurl() . '/photo/profile/' . $r[0]['uid'] . '.jpg',
'$dspr' => $dspr,
@@ -58,7 +56,7 @@ function xrd_content(&$a) {
$arr = array('user' => $r[0], 'xml' => $o);
call_hooks('personal_xrd', $arr);
- echo $o;
+ echo $arr['xml'];
killme();
}