Zot was never really supported, so it is now removed completely
This commit is contained in:
parent
2ca03acb45
commit
adf802474b
|
@ -498,10 +498,9 @@ function acl_lookup(App $a, $out_type = 'json') {
|
||||||
WHERE `uid` = %d AND NOT `self`
|
WHERE `uid` = %d AND NOT `self`
|
||||||
AND NOT `blocked` AND NOT `pending` AND NOT `archive`
|
AND NOT `blocked` AND NOT `pending` AND NOT `archive`
|
||||||
AND `success_update` >= `failure_update`
|
AND `success_update` >= `failure_update`
|
||||||
AND `network` IN ('%s','%s','%s') $sql_extra2" ,
|
AND `network` IN ('%s', '%s') $sql_extra2" ,
|
||||||
intval(local_user()),
|
intval(local_user()),
|
||||||
dbesc(NETWORK_DFRN),
|
dbesc(NETWORK_DFRN),
|
||||||
dbesc(NETWORK_ZOT),
|
|
||||||
dbesc(NETWORK_DIASPORA)
|
dbesc(NETWORK_DIASPORA)
|
||||||
);
|
);
|
||||||
$contact_count = (int)$r[0]['c'];
|
$contact_count = (int)$r[0]['c'];
|
||||||
|
@ -593,12 +592,11 @@ function acl_lookup(App $a, $out_type = 'json') {
|
||||||
} elseif ($type == 'm') {
|
} elseif ($type == 'm') {
|
||||||
$r = q("SELECT `id`, `name`, `nick`, `micro`, `network`, `url`, `attag`, `addr` FROM `contact`
|
$r = q("SELECT `id`, `name`, `nick`, `micro`, `network`, `url`, `attag`, `addr` FROM `contact`
|
||||||
WHERE `uid` = %d AND NOT `self` AND NOT `blocked` AND NOT `pending` AND NOT `archive`
|
WHERE `uid` = %d AND NOT `self` AND NOT `blocked` AND NOT `pending` AND NOT `archive`
|
||||||
AND `success_update` >= `failure_update` AND `network` IN ('%s','%s','%s')
|
AND `success_update` >= `failure_update` AND `network` IN ('%s', '%s')
|
||||||
$sql_extra2
|
$sql_extra2
|
||||||
ORDER BY `name` ASC ",
|
ORDER BY `name` ASC ",
|
||||||
intval(local_user()),
|
intval(local_user()),
|
||||||
dbesc(NETWORK_DFRN),
|
dbesc(NETWORK_DFRN),
|
||||||
dbesc(NETWORK_ZOT),
|
|
||||||
dbesc(NETWORK_DIASPORA)
|
dbesc(NETWORK_DIASPORA)
|
||||||
);
|
);
|
||||||
} elseif ($type == 'a') {
|
} elseif ($type == 'a') {
|
||||||
|
|
|
@ -1678,8 +1678,8 @@ function new_follower($importer, $contact, $datarray, $item, $sharing = false) {
|
||||||
dbesc($name),
|
dbesc($name),
|
||||||
dbesc($nick),
|
dbesc($nick),
|
||||||
dbesc($photo),
|
dbesc($photo),
|
||||||
dbesc(($sharing) ? NETWORK_ZOT : NETWORK_OSTATUS),
|
dbesc(NETWORK_OSTATUS),
|
||||||
intval(($sharing) ? CONTACT_IS_SHARING : CONTACT_IS_FOLLOWER)
|
intval(CONTACT_IS_FOLLOWER)
|
||||||
);
|
);
|
||||||
$r = q("SELECT `id`, `network` FROM `contact` WHERE `uid` = %d AND `url` = '%s' AND `pending` = 1 LIMIT 1",
|
$r = q("SELECT `id`, `network` FROM `contact` WHERE `uid` = %d AND `url` = '%s' AND `pending` = 1 LIMIT 1",
|
||||||
intval($importer['uid']),
|
intval($importer['uid']),
|
||||||
|
|
|
@ -198,9 +198,6 @@ function import_account(App $a, $file) {
|
||||||
case NETWORK_DIASPORA:
|
case NETWORK_DIASPORA:
|
||||||
// send relocate message (below)
|
// send relocate message (below)
|
||||||
break;
|
break;
|
||||||
case NETWORK_ZOT:
|
|
||||||
/// @TODO handle zot network
|
|
||||||
break;
|
|
||||||
case NETWORK_MAIL2:
|
case NETWORK_MAIL2:
|
||||||
/// @TODO ?
|
/// @TODO ?
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -18,15 +18,11 @@ function hostxrd_init(App $a) {
|
||||||
Config::set('system','site_pubkey', $res['pubkey']);
|
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');
|
$tpl = get_markup_template('xrd_host.tpl');
|
||||||
echo replace_macros($tpl, array(
|
echo replace_macros($tpl, array(
|
||||||
'$zhost' => $a->get_hostname(),
|
'$zhost' => $a->get_hostname(),
|
||||||
'$zroot' => System::baseUrl(),
|
'$zroot' => System::baseUrl(),
|
||||||
'$domain' => System::baseUrl(),
|
'$domain' => System::baseUrl(),
|
||||||
'$zot_post' => System::baseUrl() . '/post',
|
|
||||||
'$bigkey' => salmon_key(Config::get('system','site_pubkey')),
|
'$bigkey' => salmon_key(Config::get('system','site_pubkey')),
|
||||||
));
|
));
|
||||||
exit();
|
exit();
|
||||||
|
|
55
mod/post.php
55
mod/post.php
|
@ -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
|
|
||||||
}
|
|
|
@ -94,7 +94,6 @@ function xrd_xml($a, $uri, $alias, $profile_url, $r) {
|
||||||
'$profile_url' => $profile_url,
|
'$profile_url' => $profile_url,
|
||||||
'$hcard_url' => System::baseUrl() . '/hcard/' . $r['nickname'],
|
'$hcard_url' => System::baseUrl() . '/hcard/' . $r['nickname'],
|
||||||
'$atom' => System::baseUrl() . '/dfrn_poll/' . $r['nickname'],
|
'$atom' => System::baseUrl() . '/dfrn_poll/' . $r['nickname'],
|
||||||
'$zot_post' => System::baseUrl() . '/post/' . $r['nickname'],
|
|
||||||
'$poco_url' => System::baseUrl() . '/poco/' . $r['nickname'],
|
'$poco_url' => System::baseUrl() . '/poco/' . $r['nickname'],
|
||||||
'$photo' => System::baseUrl() . '/photo/profile/' . $r['uid'] . '.jpg',
|
'$photo' => System::baseUrl() . '/photo/profile/' . $r['uid'] . '.jpg',
|
||||||
'$baseurl' => System::baseUrl(),
|
'$baseurl' => System::baseUrl(),
|
||||||
|
|
|
@ -156,14 +156,13 @@ Class Cron {
|
||||||
$contacts = q("SELECT `contact`.`id` FROM `user`
|
$contacts = q("SELECT `contact`.`id` FROM `user`
|
||||||
STRAIGHT_JOIN `contact`
|
STRAIGHT_JOIN `contact`
|
||||||
ON `contact`.`uid` = `user`.`uid` AND `contact`.`rel` IN (%d, %d) AND `contact`.`poll` != ''
|
ON `contact`.`uid` = `user`.`uid` AND `contact`.`rel` IN (%d, %d) AND `contact`.`poll` != ''
|
||||||
AND `contact`.`network` IN ('%s', '%s', '%s', '%s', '%s', '%s') $sql_extra
|
AND `contact`.`network` IN ('%s', '%s', '%s', '%s', '%s') $sql_extra
|
||||||
AND NOT `contact`.`self` AND NOT `contact`.`blocked` AND NOT `contact`.`readonly`
|
AND NOT `contact`.`self` AND NOT `contact`.`blocked` AND NOT `contact`.`readonly`
|
||||||
AND NOT `contact`.`archive`
|
AND NOT `contact`.`archive`
|
||||||
WHERE NOT `user`.`account_expired` AND NOT `user`.`account_removed` $abandon_sql ORDER BY RAND()",
|
WHERE NOT `user`.`account_expired` AND NOT `user`.`account_removed` $abandon_sql ORDER BY RAND()",
|
||||||
intval(CONTACT_IS_SHARING),
|
intval(CONTACT_IS_SHARING),
|
||||||
intval(CONTACT_IS_FRIEND),
|
intval(CONTACT_IS_FRIEND),
|
||||||
dbesc(NETWORK_DFRN),
|
dbesc(NETWORK_DFRN),
|
||||||
dbesc(NETWORK_ZOT),
|
|
||||||
dbesc(NETWORK_OSTATUS),
|
dbesc(NETWORK_OSTATUS),
|
||||||
dbesc(NETWORK_FEED),
|
dbesc(NETWORK_FEED),
|
||||||
dbesc(NETWORK_MAIL),
|
dbesc(NETWORK_MAIL),
|
||||||
|
@ -192,11 +191,11 @@ Class Cron {
|
||||||
$contact['last-update'] = NULL_DATE;
|
$contact['last-update'] = NULL_DATE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (in_array($contact['network'], array(NETWORK_DFRN, NETWORK_ZOT, NETWORK_OSTATUS))) {
|
if (in_array($contact['network'], array(NETWORK_DFRN, NETWORK_OSTATUS))) {
|
||||||
$contact['priority'] = 2;
|
$contact['priority'] = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($contact['subhub'] && in_array($contact['network'], array(NETWORK_DFRN, NETWORK_ZOT, NETWORK_OSTATUS))) {
|
if ($contact['subhub'] && in_array($contact['network'], array(NETWORK_DFRN, NETWORK_OSTATUS))) {
|
||||||
/*
|
/*
|
||||||
* We should be getting everything via a hub. But just to be sure, let's check once a day.
|
* We should be getting everything via a hub. But just to be sure, let's check once a day.
|
||||||
* (You can make this more or less frequent if desired by setting 'pushpoll_frequency' appropriately)
|
* (You can make this more or less frequent if desired by setting 'pushpoll_frequency' appropriately)
|
||||||
|
|
|
@ -1472,9 +1472,6 @@ function update_1164() {
|
||||||
$r = q("UPDATE `item` SET `network`='%s' WHERE `contact-id` IN (SELECT `id` FROM`contact` WHERE `network` = '%s' AND `contact`.`uid` = `item`.`uid`)",
|
$r = q("UPDATE `item` SET `network`='%s' WHERE `contact-id` IN (SELECT `id` FROM`contact` WHERE `network` = '%s' AND `contact`.`uid` = `item`.`uid`)",
|
||||||
NETWORK_DFRN, NETWORK_DFRN);
|
NETWORK_DFRN, NETWORK_DFRN);
|
||||||
|
|
||||||
$r = q("UPDATE `item` SET `network`='%s' WHERE `contact-id` IN (SELECT `id` FROM`contact` WHERE `network` = '%s' AND `contact`.`uid` = `item`.`uid`)",
|
|
||||||
NETWORK_ZOT, NETWORK_ZOT);
|
|
||||||
|
|
||||||
$r = q("UPDATE `item` SET `network`='%s' WHERE `contact-id` IN (SELECT `id` FROM`contact` WHERE `network` = '%s' AND `contact`.`uid` = `item`.`uid`)",
|
$r = q("UPDATE `item` SET `network`='%s' WHERE `contact-id` IN (SELECT `id` FROM`contact` WHERE `network` = '%s' AND `contact`.`uid` = `item`.`uid`)",
|
||||||
NETWORK_OSTATUS, NETWORK_OSTATUS);
|
NETWORK_OSTATUS, NETWORK_OSTATUS);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user