aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorredmatrix <redmatrix@redmatrix.me>2015-08-23 13:27:34 -0700
committerredmatrix <redmatrix@redmatrix.me>2015-08-23 13:27:34 -0700
commitbf190be5b42378e3a9c122a5ff2311691b4814fe (patch)
treea84598c3960c859e79767ca3a6491691f2cc746e
parent2a59392ba8be974a5deec2e6f15959fde21186ea (diff)
downloadvolse-hubzilla-bf190be5b42378e3a9c122a5ff2311691b4814fe.tar.gz
volse-hubzilla-bf190be5b42378e3a9c122a5ff2311691b4814fe.tar.bz2
volse-hubzilla-bf190be5b42378e3a9c122a5ff2311691b4814fe.zip
issues encountered with hubzilla DB changes, zot_refresh and item_drop and hub sync
-rwxr-xr-xinclude/items.php2
-rw-r--r--include/zot.php6
2 files changed, 4 insertions, 4 deletions
diff --git a/include/items.php b/include/items.php
index 0079e0e55..9fefa699a 100755
--- a/include/items.php
+++ b/include/items.php
@@ -4366,7 +4366,7 @@ function delete_item_lowlevel($item, $stage = DROPITEM_NORMAL, $force = false) {
);
}
else {
- $r = q("UPDATE item set item_deleted = 1, changed = '%s', edited = '%s' where if = %d",
+ $r = q("UPDATE item set item_deleted = 1, changed = '%s', edited = '%s' where id = %d",
dbesc(datetime_convert()),
dbesc(datetime_convert()),
intval($item['id'])
diff --git a/include/zot.php b/include/zot.php
index 17330838b..178b8fe57 100644
--- a/include/zot.php
+++ b/include/zot.php
@@ -294,12 +294,12 @@ function zot_refresh($them, $channel = null, $force = false) {
if ($them['hubloc_url']) {
$url = $them['hubloc_url'];
} else {
- $r = q("select hubloc_url, hubloc_flags from hubloc where hubloc_hash = '%s'",
+ $r = q("select hubloc_url, hubloc_primary from hubloc where hubloc_hash = '%s'",
dbesc($them['xchan_hash'])
);
if ($r) {
foreach ($r as $rr) {
- if ($rr['hubloc_flags'] & HUBLOC_FLAGS_PRIMARY) {
+ if (intval($rr['hubloc_primary'])) {
$url = $rr['hubloc_url'];
break;
}
@@ -2207,7 +2207,7 @@ function sync_locations($sender, $arr, $absolute = false) {
dbesc(datetime_convert()),
intval($r[0]['hubloc_id'])
);
- $r[0]['hubloc_flags'] = $r[0]['hubloc_flags'] ^ HUBLOC_FLAGS_PRIMARY;
+ $r[0]['hubloc_primary'] = intval($location['primary']);
hubloc_change_primary($r[0]);
$what .= 'primary_hub ';
$changed = true;