From e60fb175242516382d1e1a61fce327c38515f3ee Mon Sep 17 00:00:00 2001 From: zotlabs Date: Sun, 9 Dec 2018 11:20:57 -0800 Subject: total_identities restriction off by one --- Zotlabs/Module/New_channel.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Zotlabs/Module/New_channel.php b/Zotlabs/Module/New_channel.php index a9022a03a..73cdf4c8c 100644 --- a/Zotlabs/Module/New_channel.php +++ b/Zotlabs/Module/New_channel.php @@ -145,7 +145,7 @@ class New_channel extends \Zotlabs\Web\Controller { $canadd = true; if($r && ($limit !== false)) { $channel_usage_message = sprintf( t("You have created %1$.0f of %2$.0f allowed channels."), $r[0]['total'], $limit); - if ($r[0]['total'] >= $limit) { + if ($r[0]['total'] > $limit) { $canadd = false; } } -- cgit v1.2.3 From 214b81e49174b98f09382eec3ef2bd7ecf24ad01 Mon Sep 17 00:00:00 2001 From: zotlabs Date: Sun, 9 Dec 2018 16:37:15 -0800 Subject: rmagic discovery for z6 networks --- Zotlabs/Module/Rmagic.php | 18 ++++++++++++++++++ boot.php | 1 + include/network.php | 29 +++++++++++++++++++++++++++++ 3 files changed, 48 insertions(+) diff --git a/Zotlabs/Module/Rmagic.php b/Zotlabs/Module/Rmagic.php index 33a6689ca..8c1e5cdab 100644 --- a/Zotlabs/Module/Rmagic.php +++ b/Zotlabs/Module/Rmagic.php @@ -14,6 +14,15 @@ class Rmagic extends \Zotlabs\Web\Controller { $r = q("select hubloc_url from hubloc where hubloc_addr = '%s' limit 1", dbesc($me) ); + if(! $r) { + $w = discover_by_webbie($me); + if($w) { + $r = q("select hubloc_url from hubloc where hubloc_addr = '%s' limit 1", + dbesc($me) + ); + } + } + if($r) { if($r[0]['hubloc_url'] === z_root()) goaway(z_root() . '/login'); @@ -49,7 +58,16 @@ class Rmagic extends \Zotlabs\Web\Controller { $r = q("select hubloc_url from hubloc where hubloc_addr = '%s' limit 1", dbesc($address) ); + if(! $r) { + $w = discover_by_webbie($address); + if($w) { + $r = q("select hubloc_url from hubloc where hubloc_addr = '%s' limit 1", + dbesc($address) + ); + } + } } + if($r) { $url = $r[0]['hubloc_url']; } diff --git a/boot.php b/boot.php index e49134a55..4087ec006 100755 --- a/boot.php +++ b/boot.php @@ -439,6 +439,7 @@ define ( 'TERM_OBJ_APP', 7 ); * various namespaces we may need to parse */ define ( 'PROTOCOL_ZOT', 'http://purl.org/zot/protocol' ); +define ( 'PROTOCOL_ZOT6', 'http://purl.org/zot/protocol/6.0' ); define ( 'NAMESPACE_ZOT', 'http://purl.org/zot' ); define ( 'NAMESPACE_DFRN' , 'http://purl.org/macgirvin/dfrn/1.0' ); define ( 'NAMESPACE_THREAD' , 'http://purl.org/syndication/thread/1.0' ); diff --git a/include/network.php b/include/network.php index 183a47105..cd352e7db 100644 --- a/include/network.php +++ b/include/network.php @@ -1,4 +1,8 @@ Date: Sun, 9 Dec 2018 20:24:04 -0800 Subject: home notifications won't expand if there are more than 300 unseen network notifications ahead of them. --- Zotlabs/Module/Ping.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Zotlabs/Module/Ping.php b/Zotlabs/Module/Ping.php index 12244d88c..a367b1062 100644 --- a/Zotlabs/Module/Ping.php +++ b/Zotlabs/Module/Ping.php @@ -347,6 +347,10 @@ class Ping extends \Zotlabs\Web\Controller { if(argc() > 1 && (argv(1) === 'network' || argv(1) === 'home')) { $result = array(); + if(argv(1) === 'home') { + $sql_extra .= ' and item_wall = 1 '; + } + $r = q("SELECT * FROM item WHERE uid = %d AND item_unseen = 1 @@ -362,8 +366,6 @@ class Ping extends \Zotlabs\Web\Controller { if($r) { xchan_query($r); foreach($r as $item) { - if((argv(1) === 'home') && (! intval($item['item_wall']))) - continue; $result[] = \Zotlabs\Lib\Enotify::format($item); } } -- cgit v1.2.3