1
0
Fork 0

Zot was never really supported, so it is now removed completely

This commit is contained in:
Michael 2017-12-02 21:57:39 +00:00
commit adf802474b
8 changed files with 7 additions and 76 deletions

View file

@ -18,15 +18,11 @@ function hostxrd_init(App $a) {
Config::set('system','site_pubkey', $res['pubkey']);
}
//$tpl = file_get_contents('view/xrd_host.tpl');
/*echo str_replace(array(
'$zhost','$zroot','$domain','$zot_post','$bigkey'),array($a->get_hostname(),System::baseUrl(),System::baseUrl(),System::baseUrl() . '/post', salmon_key(Config::get('system','site_pubkey'))),$tpl);*/
$tpl = get_markup_template('xrd_host.tpl');
echo replace_macros($tpl, array(
'$zhost' => $a->get_hostname(),
'$zroot' => System::baseUrl(),
'$domain' => System::baseUrl(),
'$zot_post' => System::baseUrl() . '/post',
'$bigkey' => salmon_key(Config::get('system','site_pubkey')),
));
exit();

View file

@ -1,55 +0,0 @@
<?php
/**
* @file mod/post.php
* @brief Zot endpoint
*/
use Friendica\App;
use Friendica\Database\DBM;
use dba;
require_once 'include/crypto.php';
// not yet ready for prime time
//require_once('include/zot.php');
/**
* @param object $a App
* @return void
*/
function post_post(App $a)
{
$bulk_delivery = false;
if ($a->argc == 1) {
$bulk_delivery = true;
} else {
$nickname = $a->argv[2];
$r = dba::select('user', array(), array('nickname' => $nickname, 'account_expired' => 0, 'account_removed' => 0), array('limit' => 1));
if (! DBM::is_result($r)) {
http_status_exit(500);
}
$importer = $r;
}
$xml = file_get_contents('php://input');
logger('mod-post: new zot: ' . $xml, LOGGER_DATA);
if (! $xml) {
http_status_exit(500);
}
$msg = zot_decode($importer, $xml);
logger('mod-post: decoded msg: ' . print_r($msg, true), LOGGER_DATA);
if (! is_array($msg)) {
http_status_exit(500);
}
$ret = 0;
$ret = zot_incoming($bulk_delivery, $importer, $msg);
http_status_exit(($ret) ? $ret : 200);
// NOTREACHED
}

View file

@ -94,7 +94,6 @@ function xrd_xml($a, $uri, $alias, $profile_url, $r) {
'$profile_url' => $profile_url,
'$hcard_url' => System::baseUrl() . '/hcard/' . $r['nickname'],
'$atom' => System::baseUrl() . '/dfrn_poll/' . $r['nickname'],
'$zot_post' => System::baseUrl() . '/post/' . $r['nickname'],
'$poco_url' => System::baseUrl() . '/poco/' . $r['nickname'],
'$photo' => System::baseUrl() . '/photo/profile/' . $r['uid'] . '.jpg',
'$baseurl' => System::baseUrl(),