aboutsummaryrefslogtreecommitdiffstats
path: root/include/hubloc.php
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2022-12-20 14:06:14 +0100
committerMario Vavti <mario@mariovavti.com>2022-12-20 14:06:14 +0100
commit62eee07b6ee7ad7f34dbe7c5080630435acbb0bf (patch)
tree23a0cbbf397c08b821100c0048fc60ce7ad1749a /include/hubloc.php
parent34125177e8973a0a419a1ea3b2c18ff62b782d97 (diff)
downloadvolse-hubzilla-62eee07b6ee7ad7f34dbe7c5080630435acbb0bf.tar.gz
volse-hubzilla-62eee07b6ee7ad7f34dbe7c5080630435acbb0bf.tar.bz2
volse-hubzilla-62eee07b6ee7ad7f34dbe7c5080630435acbb0bf.zip
make sure to include only zot6 hublocs in this query. including other networks could lead to unexpected results
Diffstat (limited to 'include/hubloc.php')
-rw-r--r--include/hubloc.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/hubloc.php b/include/hubloc.php
index 965725cba..0236e4ae7 100644
--- a/include/hubloc.php
+++ b/include/hubloc.php
@@ -79,9 +79,10 @@ function prune_hub_reinstalls() {
$r = q("select site_url from site where site_type = %d",
intval(SITE_TYPE_ZOT)
);
+
if($r) {
foreach($r as $rr) {
- $x = q("select count(*) as t, hubloc_sitekey, max(hubloc_connected) as c from hubloc where hubloc_url = '%s' group by hubloc_sitekey order by c",
+ $x = q("select count(*) as t, hubloc_sitekey, max(hubloc_connected) as c from hubloc where hubloc_url = '%s' and hubloc_network = 'zot6' group by hubloc_sitekey order by c",
dbesc($rr['site_url'])
);