diff options
author | Paolo T <tuscanhobbit@users.noreply.github.com> | 2014-09-02 13:15:59 +0200 |
---|---|---|
committer | Paolo T <tuscanhobbit@users.noreply.github.com> | 2014-09-02 13:15:59 +0200 |
commit | fee5b6bd1599599da2f3b662f04b9651b23fb4e4 (patch) | |
tree | e4ab47f657ce1e6ae0aabf6be51bdf169e4b389d /include/Contact.php | |
parent | a1f85cda3ec0e6fc1c661ee12b1e7d87b3f242c5 (diff) | |
parent | 9dac46ca25b11f80dded42db31e7e062fc7b5142 (diff) | |
download | volse-hubzilla-fee5b6bd1599599da2f3b662f04b9651b23fb4e4.tar.gz volse-hubzilla-fee5b6bd1599599da2f3b662f04b9651b23fb4e4.tar.bz2 volse-hubzilla-fee5b6bd1599599da2f3b662f04b9651b23fb4e4.zip |
Merge pull request #2 from friendica/master
Merge from main project
Diffstat (limited to 'include/Contact.php')
-rw-r--r-- | include/Contact.php | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/include/Contact.php b/include/Contact.php index 140f449af..a9e737bde 100644 --- a/include/Contact.php +++ b/include/Contact.php @@ -245,12 +245,12 @@ function channel_remove($channel_id, $local = true, $unset_session=true) { intval($channel_id) ); - $r = q("update hubloc set hubloc_flags = hubloc_flags | %d where hubloc_hash = '%s'", + $r = q("update hubloc set hubloc_flags = (hubloc_flags | %d) where hubloc_hash = '%s'", intval(HUBLOC_FLAGS_DELETED), dbesc($channel['channel_hash']) ); - $r = q("update xchan set xchan_flags = xchan_flags | %d where xchan_hash = '%s'", + $r = q("update xchan set xchan_flags = (xchan_flags | %d) where xchan_hash = '%s'", intval(XCHAN_FLAGS_DELETED), dbesc($channel['channel_hash']) ); @@ -274,7 +274,7 @@ function channel_remove($channel_id, $local = true, $unset_session=true) { q("DELETE FROM `spam` WHERE `uid` = %d", intval($channel_id)); - q("delete from abook where abook_xchan = '%s' and abook_flags & %d limit 1", + q("delete from abook where abook_xchan = '%s' and (abook_flags & %d) limit 1", dbesc($channel['channel_hash']), dbesc(ABOOK_FLAG_SELF) ); @@ -285,13 +285,13 @@ function channel_remove($channel_id, $local = true, $unset_session=true) { intval($channel_id) ); - $r = q("update hubloc set hubloc_flags = hubloc_flags | %d where hubloc_hash = '%s' and hubloc_url = '%s' ", + $r = q("update hubloc set hubloc_flags = (hubloc_flags | %d) where hubloc_hash = '%s' and hubloc_url = '%s' ", intval(HUBLOC_FLAGS_DELETED), dbesc($channel['channel_hash']), dbesc(z_root()) ); - $r = q("update xchan set xchan_flags = xchan_flags | %d where xchan_hash = '%s' ", + $r = q("update xchan set xchan_flags = (xchan_flags | %d) where xchan_hash = '%s' ", intval(XCHAN_FLAGS_DELETED), dbesc($channel['channel_hash']) ); @@ -323,7 +323,7 @@ function mark_orphan_hubsxchans() { return; $r = q("update hubloc set hubloc_status = (hubloc_status | %d) where not (hubloc_status & %d) - and hubloc_connected < utc_timestamp() - interval 36 day", + and hubloc_network != 'zot' and hubloc_connected < utc_timestamp() - interval 36 day", intval(HUBLOC_OFFLINE), intval(HUBLOC_OFFLINE) ); @@ -435,12 +435,12 @@ function remove_all_xchan_resources($xchan, $channel_id = 0) { // directory servers need to keep the record around for sync purposes - mark it deleted - $r = q("update hubloc set hubloc_flags = hubloc_flags | %d where hubloc_hash = '%s'", + $r = q("update hubloc set hubloc_flags = (hubloc_flags | %d) where hubloc_hash = '%s'", intval(HUBLOC_FLAGS_DELETED), dbesc($xchan) ); - $r = q("update xchan set xchan_flags = xchan_flags | %d where xchan_hash = '%s'", + $r = q("update xchan set xchan_flags = (xchan_flags | %d) where xchan_hash = '%s'", intval(XCHAN_FLAGS_DELETED), dbesc($xchan) ); |