aboutsummaryrefslogtreecommitdiffstats
path: root/include/fixd.php
blob: bce5eb3485e3f0e35653f45e8dae4cdb85d6d297 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<?php

	require_once('include/cli_startup.php');

	cli_startup();

	$rand = db_getfunc('RAND');
	$r = q("select xchan_addr, hubloc_url from xchan left join hubloc on hubloc_hash = xchan_hash where xchan_network like '%%diaspora%%' order by $rand");

	if(! $r)
		killme();

	require_once('include/network.php');
	$total = 0;
	foreach ($r as $rr) {
		if($rr['hubloc_url']) {
			continue;
		}
		$total ++;
	}

	print $total . "\n";

	foreach ($r as $rr) {
		if($rr['hubloc_url']) {
			continue;
		}

		$webbie = $rr['xchan_addr'];
		print $webbie . ' ';

		discover_by_webbie($webbie);
	}