aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorThomas Willingham <beardyunixer@beardyunixer.com>2014-11-29 22:01:09 +0000
committerThomas Willingham <beardyunixer@beardyunixer.com>2014-11-29 22:01:09 +0000
commitbc5a4f19d0805c443955f4df2459c5d247c918e4 (patch)
treefc0ae6599137131881f9b10733ca8fb70bb86f23 /include
parentf852a1f2288c8dc5be30e87b5143a674c0b96890 (diff)
downloadvolse-hubzilla-bc5a4f19d0805c443955f4df2459c5d247c918e4.tar.gz
volse-hubzilla-bc5a4f19d0805c443955f4df2459c5d247c918e4.tar.bz2
volse-hubzilla-bc5a4f19d0805c443955f4df2459c5d247c918e4.zip
Fix abook_toggle_flag from postgres stuff
Diffstat (limited to 'include')
-rw-r--r--include/Contact.php12
1 files changed, 7 insertions, 5 deletions
diff --git a/include/Contact.php b/include/Contact.php
index f0c7cd737..dedde3d1e 100644
--- a/include/Contact.php
+++ b/include/Contact.php
@@ -128,11 +128,13 @@ function vcard_from_xchan($xchan, $observer = null, $mode = '') {
function abook_toggle_flag($abook,$flag) {
- $r = q("UPDATE abook set abook_flags = (abook_flags & ~%d) where abook_id = %d and abook_channel = %d",
- intval($flag),
- intval($abook['abook_id']),
- intval($abook['abook_channel'])
- );
+ $r = q("UPDATE abook set abook_flags = (abook_flags %s %d) where abook_id = %d and abook_channel = %d",
+ db_getfunc('^'),
+ intval($flag),
+ intval($abook['abook_id']),
+ intval($abook['abook_channel'])
+ );
+
// if unsetting the archive bit, update the timestamps so we'll try to connect for an additional 30 days.