make sure to include only zot6 hublocs in this query. including other networks could lead to unexpected results

This commit is contained in:
Mario Vavti
2022-12-20 14:06:14 +01:00
parent 34125177e8
commit 62eee07b6e

View File

@@ -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'])
);