aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2018-11-05 19:34:10 -0800
committerzotlabs <mike@macgirvin.com>2018-11-05 19:34:10 -0800
commitfabcf841c9b4a360e2e496d04775e2ef594cb0e3 (patch)
tree7dbbf985d0f1359c96a887bb4e5a919d89e0f7fb
parent43a5f928bae3d886dd355497d63ad961425cb3c4 (diff)
downloadvolse-hubzilla-fabcf841c9b4a360e2e496d04775e2ef594cb0e3.tar.gz
volse-hubzilla-fabcf841c9b4a360e2e496d04775e2ef594cb0e3.tar.bz2
volse-hubzilla-fabcf841c9b4a360e2e496d04775e2ef594cb0e3.zip
z6 work
-rw-r--r--Zotlabs/Lib/Libzot.php9
-rw-r--r--Zotlabs/Zot6/Zot6Handler.php3
-rw-r--r--install/schema_mysql.sql4
-rw-r--r--install/schema_postgres.sql4
4 files changed, 15 insertions, 5 deletions
diff --git a/Zotlabs/Lib/Libzot.php b/Zotlabs/Lib/Libzot.php
index 2c726aff4..3d18df051 100644
--- a/Zotlabs/Lib/Libzot.php
+++ b/Zotlabs/Lib/Libzot.php
@@ -324,11 +324,12 @@ class Libzot {
logger('zot-info: ' . print_r($record,true), LOGGER_DATA, LOG_DEBUG);
$x = self::import_xchan($record['data'], (($force) ? UPDATE_FLAGS_FORCED : UPDATE_FLAGS_UPDATED));
-
+logger('1');
if(! $x['success'])
return false;
-
+logger('2');
if($channel && $record['data']['permissions']) {
+logger('3');
$old_read_stream_perm = their_perms_contains($channel['channel_id'],$x['hash'],'view_stream');
set_abconfig($channel['channel_id'],$x['hash'],'system','their_perms',$record['data']['permissions']);
@@ -350,7 +351,7 @@ class Libzot {
);
if($r) {
-
+logger('4');
// connection exists
// if the dob is the same as what we have stored (disregarding the year), keep the one
@@ -2749,7 +2750,7 @@ class Libzot {
];
$ret['channel_role'] = get_pconfig($e['channel_id'],'system','permissions_role','custom');
- $ret['protocols'] = [ 'zot6' ];
+ $ret['protocols'] = [ 'zot', 'zot6' ];
$ret['searchable'] = $searchable;
$ret['adult_content'] = $adult_channel;
$ret['public_forum'] = $public_forum;
diff --git a/Zotlabs/Zot6/Zot6Handler.php b/Zotlabs/Zot6/Zot6Handler.php
index 5597921cc..6fc82501a 100644
--- a/Zotlabs/Zot6/Zot6Handler.php
+++ b/Zotlabs/Zot6/Zot6Handler.php
@@ -70,9 +70,10 @@ class Zot6Handler implements IHandler {
// This would be a permissions update, typically for one connection
foreach ($recipients as $recip) {
+
$r = q("select channel.*,xchan.* from channel
left join xchan on channel_hash = xchan_hash
- where channel_hash ='%s' limit 1",
+ where xchan_hash ='%s' limit 1",
dbesc($recip)
);
diff --git a/install/schema_mysql.sql b/install/schema_mysql.sql
index ef7e2a516..088c0414d 100644
--- a/install/schema_mysql.sql
+++ b/install/schema_mysql.sql
@@ -247,6 +247,7 @@ CREATE TABLE IF NOT EXISTS `channel` (
`channel_guid` char(191) NOT NULL DEFAULT '',
`channel_guid_sig` text NOT NULL,
`channel_hash` char(191) NOT NULL DEFAULT '',
+ `channel_portable_id` char(191) NOT NULL DEFAULT '',
`channel_timezone` char(128) NOT NULL DEFAULT 'UTC',
`channel_location` char(191) NOT NULL DEFAULT '',
`channel_theme` char(191) NOT NULL DEFAULT '',
@@ -306,6 +307,7 @@ CREATE TABLE IF NOT EXISTS `channel` (
KEY `channel_default_gid` (`channel_default_group`),
KEY `channel_guid` (`channel_guid`),
KEY `channel_hash` (`channel_hash`),
+ KEY `channel_portable_id` (`channel_portable_id`),
KEY `channel_expire_days` (`channel_expire_days`),
KEY `channel_deleted` (`channel_deleted`),
KEY `channel_active` (`channel_active`),
@@ -1296,6 +1298,7 @@ CREATE TABLE IF NOT EXISTS `vote` (
CREATE TABLE IF NOT EXISTS `xchan` (
`xchan_hash` char(191) NOT NULL,
+ `xchan_portable_id` char(191) NOT NULL DEFAULT '',,
`xchan_guid` char(191) NOT NULL DEFAULT '',
`xchan_guid_sig` text NOT NULL,
`xchan_pubkey` text NOT NULL,
@@ -1322,6 +1325,7 @@ CREATE TABLE IF NOT EXISTS `xchan` (
`xchan_pubforum` tinyint(1) NOT NULL DEFAULT 0 ,
`xchan_deleted` tinyint(1) NOT NULL DEFAULT 0 ,
PRIMARY KEY (`xchan_hash`),
+ KEY `xchan_portable_id` (`xchan_portable_id`),
KEY `xchan_guid` (`xchan_guid`),
KEY `xchan_addr` (`xchan_addr`),
KEY `xchan_name` (`xchan_name`),
diff --git a/install/schema_postgres.sql b/install/schema_postgres.sql
index cb4476628..ec4fb63ad 100644
--- a/install/schema_postgres.sql
+++ b/install/schema_postgres.sql
@@ -242,6 +242,7 @@ CREATE TABLE "channel" (
"channel_guid" text NOT NULL DEFAULT '',
"channel_guid_sig" text NOT NULL,
"channel_hash" text NOT NULL DEFAULT '',
+ "channel_portable_id" text NOT NULL DEFAULT '',
"channel_timezone" varchar(128) NOT NULL DEFAULT 'UTC',
"channel_location" text NOT NULL DEFAULT '',
"channel_theme" text NOT NULL DEFAULT '',
@@ -284,6 +285,7 @@ create index "channel_max_friend_req" on channel ("channel_max_friend_req");
create index "channel_default_gid" on channel ("channel_default_group");
create index "channel_guid" on channel ("channel_guid");
create index "channel_hash" on channel ("channel_hash");
+create index "channel_portable_id" on channel ("channel_portable_id");
create index "channel_expire_days" on channel ("channel_expire_days");
create index "channel_deleted" on channel ("channel_deleted");
create index "channel_active" on channel ("channel_active");
@@ -1267,6 +1269,7 @@ create index "vote_poll" on vote ("vote_poll");
create index "vote_element" on vote ("vote_element");
CREATE TABLE "xchan" (
"xchan_hash" text NOT NULL,
+ "xchan_portable_id" text NOT NULL,
"xchan_guid" text NOT NULL DEFAULT '',
"xchan_guid_sig" text NOT NULL DEFAULT '',
"xchan_pubkey" text NOT NULL DEFAULT '',
@@ -1294,6 +1297,7 @@ CREATE TABLE "xchan" (
"xchan_deleted" smallint NOT NULL DEFAULT '0',
PRIMARY KEY ("xchan_hash")
);
+create index "xchan_portable_id" on xchan ("xchan_portable_id");
create index "xchan_guid" on xchan ("xchan_guid");
create index "xchan_addr" on xchan ("xchan_addr");
create index "xchan_name" on xchan ("xchan_name");