aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Module
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2018-12-10 10:38:06 +0100
committerMario Vavti <mario@mariovavti.com>2018-12-10 10:38:06 +0100
commit15a689c6f549e25a1301a8cb8ba92c4cd4f90300 (patch)
tree7853e7adfa1c105038fdc0fe53f4e896925b3d65 /Zotlabs/Module
parent61f7c1e7d717cee4feb769e8e66cea53514a684f (diff)
parent30efeb5becb2b5e1133f429460c5c3bbc9b44f55 (diff)
downloadvolse-hubzilla-15a689c6f549e25a1301a8cb8ba92c4cd4f90300.tar.gz
volse-hubzilla-15a689c6f549e25a1301a8cb8ba92c4cd4f90300.tar.bz2
volse-hubzilla-15a689c6f549e25a1301a8cb8ba92c4cd4f90300.zip
Merge remote-tracking branch 'mike/master' into dev
Diffstat (limited to 'Zotlabs/Module')
-rw-r--r--Zotlabs/Module/New_channel.php2
-rw-r--r--Zotlabs/Module/Ping.php6
-rw-r--r--Zotlabs/Module/Rmagic.php18
3 files changed, 23 insertions, 3 deletions
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;
}
}
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);
}
}
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'];
}