diff options
author | friendica <info@friendica.com> | 2014-04-02 14:56:20 -0700 |
---|---|---|
committer | friendica <info@friendica.com> | 2014-04-02 14:56:20 -0700 |
commit | 0a097b833750ad8941dba03e6821c13facebd597 (patch) | |
tree | e4bceac1bbe231c855e13c269fa6399c6bcf8f2e /mod/hostxrd.php | |
parent | 60a9b3a6998154db0381a24d10e95558ad10642c (diff) | |
download | volse-hubzilla-0a097b833750ad8941dba03e6821c13facebd597.tar.gz volse-hubzilla-0a097b833750ad8941dba03e6821c13facebd597.tar.bz2 volse-hubzilla-0a097b833750ad8941dba03e6821c13facebd597.zip |
snakebite: bring back some of the legacy XML discovery interfaces, update as required.
Diffstat (limited to 'mod/hostxrd.php')
-rw-r--r-- | mod/hostxrd.php | 24 |
1 files changed, 6 insertions, 18 deletions
diff --git a/mod/hostxrd.php b/mod/hostxrd.php index 0a66dcc84..ef86f2dd9 100644 --- a/mod/hostxrd.php +++ b/mod/hostxrd.php @@ -1,28 +1,16 @@ <?php -require_once('include/crypto.php'); - function hostxrd_init(&$a) { header('Access-Control-Allow-Origin: *'); header("Content-type: text/xml"); - $pubkey = get_config('system','site_pubkey'); - - if(! $pubkey) { - $res = new_keypair(1024); - - set_config('system','site_prvkey', $res['prvkey']); - set_config('system','site_pubkey', $res['pubkey']); - } $tpl = get_markup_template('xrd_host.tpl'); - echo replace_macros($tpl, array( + $x = replace_macros(get_markup_template('xrd_host.tpl'), array( '$zhost' => $a->get_hostname(), - '$zroot' => z_root(), - '$domain' => z_path(), - '$zot_post' => z_root() . '/post', - '$bigkey' => salmon_key(get_config('system','site_pubkey')), + '$zroot' => z_root() )); - session_write_close(); - exit(); - + $arr = array('xrd' => $x); + call_hooks('hostxrd',$arr); + echo $arr['xrd']; + killme(); } |