aboutsummaryrefslogtreecommitdiffstats
path: root/include/zot.php
diff options
context:
space:
mode:
Diffstat (limited to 'include/zot.php')
-rw-r--r--include/zot.php10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/zot.php b/include/zot.php
index 0f42ddc7f..74ac6d015 100644
--- a/include/zot.php
+++ b/include/zot.php
@@ -610,6 +610,16 @@ function import_xchan($arr) {
$what = 'primary_hub ';
$changed = true;
}
+ if((($r[0]['hubloc_flags'] & HUBLOC_FLAGS_DELETED) && (! $location['deleted']))
+ || ((! ($r[0]['hubloc_flags'] & HUBLOC_FLAGS_DELETED)) && ($location['deleted']))) {
+ $r = q("update hubloc set hubloc_flags = (hubloc_flags ^ %d), hubloc_updated = '%s' where hubloc_id = %d limit 1",
+ intval(HUBLOC_FLAGS_DELETED),
+ dbesc(datetime_convert()),
+ intval($r[0]['hubloc_id'])
+ );
+ $what = 'delete_hub ';
+ $changed = true;
+ }
continue;
}