add Thomas's Diaspora repair script as include/fixd.php - altered so it can be re-run if necessary with a count of remaining hublocs to be fixed. Some sites are down so it probably can't ever get to zero. The check for a null join is quite an expensive query. It could block your DB for a couple minutes while it runs.

Also some preliminary work on a means to take the channel module out of list/forum mode if a specific mid is requested.
This commit is contained in:
friendica
2014-12-16 00:25:41 -08:00
parent 2e990743e7
commit 17e27d0d87
4 changed files with 51 additions and 17 deletions

33
include/fixd.php Normal file
View File

@@ -0,0 +1,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);
}