aboutsummaryrefslogtreecommitdiffstats
path: root/include/Contact.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2015-01-20 19:33:19 -0800
committerfriendica <info@friendica.com>2015-01-20 19:33:19 -0800
commit51848c619080e19cace647966a17eb9a1b42ca25 (patch)
tree6aee6c9487813051801cabbd2a4914528232d5b5 /include/Contact.php
parentee3eee425c92b37fba5a7035d8e9ec0b0b563d0b (diff)
downloadvolse-hubzilla-51848c619080e19cace647966a17eb9a1b42ca25.tar.gz
volse-hubzilla-51848c619080e19cace647966a17eb9a1b42ca25.tar.bz2
volse-hubzilla-51848c619080e19cace647966a17eb9a1b42ca25.zip
working through the xchan table to remove bitfields, mostly complete except for updating the updater
Diffstat (limited to 'include/Contact.php')
-rw-r--r--include/Contact.php16
1 files changed, 5 insertions, 11 deletions
diff --git a/include/Contact.php b/include/Contact.php
index c872dc913..b01ac0174 100644
--- a/include/Contact.php
+++ b/include/Contact.php
@@ -276,8 +276,7 @@ function channel_remove($channel_id, $local = true, $unset_session=true) {
);
- $r = q("update xchan set xchan_flags = (xchan_flags | %d) where xchan_hash = '%s'",
- intval(XCHAN_FLAGS_DELETED),
+ $r = q("update xchan set xchan_deleted = 1 where xchan_hash = '%s'",
dbesc($channel['channel_hash'])
);
@@ -326,8 +325,7 @@ function channel_remove($channel_id, $local = true, $unset_session=true) {
$hublocs = count($r);
if(! $hublocs) {
- $r = q("update xchan set xchan_flags = (xchan_flags | %d) where xchan_hash = '%s' ",
- intval(XCHAN_FLAGS_DELETED),
+ $r = q("update xchan set xchan_deleted = 1 where xchan_hash = '%s' ",
dbesc($channel['channel_hash'])
);
}
@@ -402,9 +400,7 @@ function mark_orphan_hubsxchans() {
// yes - if the xchan was marked as an orphan, undo it
- $y = q("update xchan set xchan_flags = (xchan_flags & ~%d) where (xchan_flags & %d)>0 and xchan_hash = '%s'",
- intval(XCHAN_FLAGS_ORPHAN),
- intval(XCHAN_FLAGS_ORPHAN),
+ $y = q("update xchan set xchan_orphan = 0 where xchan_orphan = 1 and xchan_hash = '%s'",
dbesc($rr['hubloc_hash'])
);
@@ -413,8 +409,7 @@ function mark_orphan_hubsxchans() {
// nope - mark the xchan as an orphan
- $y = q("update xchan set xchan_flags = (xchan_flags | %d) where xchan_hash = '%s'",
- intval(XCHAN_FLAGS_ORPHAN),
+ $y = q("update xchan set xchan_orphan = 1 where xchan_hash = '%s'",
dbesc($rr['hubloc_hash'])
);
}
@@ -494,8 +489,7 @@ function remove_all_xchan_resources($xchan, $channel_id = 0) {
dbesc($xchan)
);
- $r = q("update xchan set xchan_flags = (xchan_flags | %d) where xchan_hash = '%s'",
- intval(XCHAN_FLAGS_DELETED),
+ $r = q("update xchan set xchan_deleted = 1 where xchan_hash = '%s'",
dbesc($xchan)
);
}