dangerous typo that removes all your hublocs, fix reshare formatting

This commit is contained in:
friendica
2013-03-11 16:13:09 -07:00
parent bcf4592cb0
commit b86277b0ff
6 changed files with 49 additions and 38 deletions

View File

@@ -520,7 +520,7 @@ function import_xchan($arr) {
}
for($x = 0; $x < count($xisting); $x ++) {
if($xisiting[$x]['hubloc_url'] == $location['url']) {
if($xisting[$x]['hubloc_url'] == $location['url']) {
$xisting[$x]['updated'] = true;
}
}
@@ -567,10 +567,10 @@ function import_xchan($arr) {
}
// get rid of any hubs we have for this channel which weren't reported.
if($xisting) {
foreach($xisting as $x) {
if(! array_key_exists('updated',$x)) {
logger('import_xchan: removing unreferenced hub location ' . $x['hubloc_url');
$r = q("delete from hubloc where hubloc_id = %d limit 1",
intval($x['hubloc_id'])
);