aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorredmatrix <redmatrix@redmatrix.me>2015-11-02 21:02:30 -0800
committerredmatrix <redmatrix@redmatrix.me>2015-11-02 21:02:30 -0800
commitd13dae6b060ad1147426ae88791cac5970ab3b03 (patch)
tree4d2e90f3fd1f903d80e8f6b13c4dfa365e29c117
parent0998ef0c4e6541807f64a6c635a0ba978371968f (diff)
downloadvolse-hubzilla-d13dae6b060ad1147426ae88791cac5970ab3b03.tar.gz
volse-hubzilla-d13dae6b060ad1147426ae88791cac5970ab3b03.tar.bz2
volse-hubzilla-d13dae6b060ad1147426ae88791cac5970ab3b03.zip
bug in hub/location sync
-rw-r--r--include/zot.php7
1 files changed, 3 insertions, 4 deletions
diff --git a/include/zot.php b/include/zot.php
index f8b8ba43f..b13111f04 100644
--- a/include/zot.php
+++ b/include/zot.php
@@ -2364,16 +2364,15 @@ function sync_locations($sender, $arr, $absolute = false) {
$changed = true;
}
}
- if((intval($r[0]['hubloc_deleted']) && (! $location['deleted']))
- || ((! (intval($r[0]['hubloc_deleted']))) && ($location['deleted']))) {
+ if(intval($r[0]['hubloc_deleted']) && (! intval($location['deleted']))) {
$n = q("update hubloc set hubloc_deleted = 0, hubloc_updated = '%s' where hubloc_id = %d",
dbesc(datetime_convert()),
intval($r[0]['hubloc_id'])
);
- $what .= 'delete_hub ';
+ $what .= 'undelete_hub ';
$changed = true;
}
- elseif((! intval($r[0]['hubloc_deleted'])) && ($location['deleted'])) {
+ elseif((! intval($r[0]['hubloc_deleted'])) && (intval($location['deleted']))) {
$n = q("update hubloc set hubloc_deleted = 1, hubloc_updated = '%s' where hubloc_id = %d",
dbesc(datetime_convert()),
intval($r[0]['hubloc_id'])