aboutsummaryrefslogtreecommitdiffstats
path: root/mod/xrd.php
diff options
context:
space:
mode:
authorFriendika <info@friendika.com>2011-08-09 18:55:46 -0700
committerFriendika <info@friendika.com>2011-08-09 18:55:46 -0700
commit1bfe1283aa38454369f29883411a6c012c88df59 (patch)
treeb85f93b9d4c6b40bf4678ccd32fea7b9531f27bb /mod/xrd.php
parent49be3941828668e762141972afa1324045805f20 (diff)
downloadvolse-hubzilla-1bfe1283aa38454369f29883411a6c012c88df59.tar.gz
volse-hubzilla-1bfe1283aa38454369f29883411a6c012c88df59.tar.bz2
volse-hubzilla-1bfe1283aa38454369f29883411a6c012c88df59.zip
crypto stuff
Diffstat (limited to 'mod/xrd.php')
-rw-r--r--mod/xrd.php14
1 files changed, 5 insertions, 9 deletions
diff --git a/mod/xrd.php b/mod/xrd.php
index 9021222b7..fcec74336 100644
--- a/mod/xrd.php
+++ b/mod/xrd.php
@@ -1,9 +1,8 @@
<?php
-require_once('salmon.php');
-require_once('certfns.php');
+require_once('include/crypto.php');
-function xrd_content(&$a) {
+function xrd_init(&$a) {
$uri = urldecode(notags(trim($_GET['uri'])));
@@ -23,14 +22,12 @@ function xrd_content(&$a) {
if(! count($r))
killme();
- $salmon_key = str_replace('=','',salmon_key($r[0]['spubkey']));
+ $salmon_key = salmon_key($r[0]['spubkey']);
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(),
@@ -41,7 +38,6 @@ function xrd_content(&$a) {
else
$dspr = '';
-
$tpl = file_get_contents('view/xrd_person.tpl');
$o = replace_macros($tpl, array(
@@ -60,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();
}