aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Module
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2021-05-26 12:18:59 +0000
committerMario <mario@mariovavti.com>2021-05-26 12:18:59 +0000
commit1fa4bc9ac024983d4748262f98c6ddf323ad327c (patch)
tree807e3253255a8a24ded4ff81dd9313b37fb6e4cb /Zotlabs/Module
parentb742910107720797b05ec69ae626b420699e0630 (diff)
downloadvolse-hubzilla-1fa4bc9ac024983d4748262f98c6ddf323ad327c.tar.gz
volse-hubzilla-1fa4bc9ac024983d4748262f98c6ddf323ad327c.tar.bz2
volse-hubzilla-1fa4bc9ac024983d4748262f98c6ddf323ad327c.zip
remove most legacy zot quirks
Diffstat (limited to 'Zotlabs/Module')
-rw-r--r--Zotlabs/Module/Connedit.php11
-rw-r--r--Zotlabs/Module/Fhublocs.php17
-rw-r--r--Zotlabs/Module/Import.php59
3 files changed, 4 insertions, 83 deletions
diff --git a/Zotlabs/Module/Connedit.php b/Zotlabs/Module/Connedit.php
index 44211c8b9..61fe4a889 100644
--- a/Zotlabs/Module/Connedit.php
+++ b/Zotlabs/Module/Connedit.php
@@ -478,16 +478,11 @@ class Connedit extends Controller {
}
if($cmd === 'refresh') {
- if($orig_record[0]['xchan_network'] === 'zot') {
- if(! zot_refresh($orig_record[0],App::get_channel()))
- notice( t('Refresh failed - channel is currently unavailable.') );
- }
- elseif($orig_record[0]['xchan_network'] === 'zot6') {
+ if($orig_record[0]['xchan_network'] === 'zot6') {
if(! Libzot::refresh($orig_record[0],App::get_channel()))
notice( t('Refresh failed - channel is currently unavailable.') );
}
else {
-
// if you are on a different network we'll force a refresh of the connection basic info
Master::Summon(array('Notifier','permission_update',$contact_id));
}
@@ -667,7 +662,7 @@ class Connedit extends Controller {
);
- if(in_array($contact['xchan_network'], ['zot6', 'zot'])) {
+ if($contact['xchan_network'] === 'zot6') {
$tools['fetchvc'] = [
'label' => t('Fetch Vcard'),
'url' => z_root() . '/connedit/' . $contact['abook_id'] . '/fetchvc',
@@ -841,7 +836,7 @@ class Connedit extends Controller {
$locstr = unpunify($contact['xchan_url']);
$clone_warn = '';
- $clonable = (in_array($contact['xchan_network'],['zot', 'zot6', 'rss']) ? true : false);
+ $clonable = (in_array($contact['xchan_network'], ['zot6', 'rss']);
if(! $clonable) {
$clone_warn = '<strong>';
$clone_warn .= ((intval($contact['abook_not_here']))
diff --git a/Zotlabs/Module/Fhublocs.php b/Zotlabs/Module/Fhublocs.php
index 42dac5b12..4918f751b 100644
--- a/Zotlabs/Module/Fhublocs.php
+++ b/Zotlabs/Module/Fhublocs.php
@@ -59,23 +59,6 @@ class Fhublocs extends \Zotlabs\Web\Controller {
// Create a verified hub location pointing to this site.
-/*
- $h = hubloc_store_lowlevel(
- [
- 'hubloc_guid' => $rr['channel_guid'],
- 'hubloc_guid_sig' => $rr['channel_guid_sig'],
- 'hubloc_hash' => $rr['channel_hash'],
- 'hubloc_addr' => channel_reddress($rr),
- 'hubloc_network' => 'zot',
- 'hubloc_primary' => $primary,
- 'hubloc_url' => z_root(),
- 'hubloc_url_sig' => base64url_encode(Crypto::sign(z_root(),$rr['channel_prvkey'])),
- 'hubloc_host' => \App::get_hostname(),
- 'hubloc_callback' => z_root() . '/post',
- 'hubloc_sitekey' => $sitekey
- ]
- );
-*/
$h = hubloc_store_lowlevel(
[
'hubloc_guid' => $rr['channel_guid'],
diff --git a/Zotlabs/Module/Import.php b/Zotlabs/Module/Import.php
index 4622a588d..76d4fa733 100644
--- a/Zotlabs/Module/Import.php
+++ b/Zotlabs/Module/Import.php
@@ -212,35 +212,8 @@ class Import extends \Zotlabs\Web\Controller {
// create new hubloc for the new channel at this site
if(array_key_exists('channel',$data)) {
- if($channel['channel_portable_id']) {
- $r = hubloc_store_lowlevel(
- [
- 'hubloc_guid' => $channel['channel_guid'],
- 'hubloc_guid_sig' => $channel['channel_guid_sig'],
- 'hubloc_hash' => $channel['channel_portable_id'],
- 'hubloc_addr' => channel_reddress($channel),
- 'hubloc_network' => 'zot',
- 'hubloc_primary' => (($seize) ? 1 : 0),
- 'hubloc_url' => z_root(),
- 'hubloc_url_sig' => base64url_encode(Crypto::sign(z_root(),$channel['channel_prvkey'])),
- 'hubloc_host' => \App::get_hostname(),
- 'hubloc_callback' => z_root() . '/post',
- 'hubloc_sitekey' => get_config('system','pubkey'),
- 'hubloc_updated' => datetime_convert(),
- 'hubloc_id_url' => channel_url($channel)
- ]
- );
- // reset the original primary hubloc if it is being seized
- if($seize) {
- $r = q("update hubloc set hubloc_primary = 0 where hubloc_primary = 1 and hubloc_hash = '%s' and hubloc_url != '%s' ",
- dbesc($channel['channel_portable_id']),
- dbesc(z_root())
- );
- }
- }
-
- // create a new zot6 hubloc if we have got a channel_portable_id
+ // create a new zot6 hubloc
$r = hubloc_store_lowlevel(
[
@@ -285,28 +258,6 @@ class Import extends \Zotlabs\Web\Controller {
dbesc($channel['channel_portable_id'])
);
- if($channel['channel_portable_id']) {
- $r = xchan_store_lowlevel(
- [
- 'xchan_hash' => $channel['channel_portable_id'],
- 'xchan_guid' => $channel['channel_guid'],
- 'xchan_guid_sig' => $channel['channel_guid_sig'],
- 'xchan_pubkey' => $channel['channel_pubkey'],
- 'xchan_photo_l' => z_root() . "/photo/profile/l/" . $channel['channel_id'],
- 'xchan_photo_m' => z_root() . "/photo/profile/m/" . $channel['channel_id'],
- 'xchan_photo_s' => z_root() . "/photo/profile/s/" . $channel['channel_id'],
- 'xchan_addr' => channel_reddress($channel),
- 'xchan_url' => z_root() . '/channel/' . $channel['channel_address'],
- 'xchan_connurl' => z_root() . '/poco/' . $channel['channel_address'],
- 'xchan_follow' => z_root() . '/follow?f=&url=%s',
- 'xchan_name' => $channel['channel_name'],
- 'xchan_network' => 'zot',
- 'xchan_photo_date' => datetime_convert(),
- 'xchan_name_date' => datetime_convert()
- ]
- );
- }
-
$r = xchan_store_lowlevel(
[
'xchan_hash' => $channel['channel_hash'],
@@ -336,14 +287,6 @@ class Import extends \Zotlabs\Web\Controller {
if($xchans) {
foreach($xchans as $xchan) {
- if($xchan['xchan_network'] === 'zot') {
- $hash = make_xchan_hash($xchan['xchan_guid'],$xchan['xchan_guid_sig']);
- if($hash !== $xchan['xchan_hash']) {
- logger('forged xchan: ' . print_r($xchan,true));
- continue;
- }
- }
-
if($xchan['xchan_network'] === 'zot6') {
$zhash = Libzot::make_xchan_hash($xchan['xchan_guid'],$xchan['xchan_pubkey']);
if($zhash !== $xchan['xchan_hash']) {