Fix abook_toggle_flag from postgres stuff
This commit is contained in:
parent
f852a1f228
commit
bc5a4f19d0
@ -128,12 +128,14 @@ function vcard_from_xchan($xchan, $observer = null, $mode = '') {
|
|||||||
|
|
||||||
function abook_toggle_flag($abook,$flag) {
|
function abook_toggle_flag($abook,$flag) {
|
||||||
|
|
||||||
$r = q("UPDATE abook set abook_flags = (abook_flags & ~%d) where abook_id = %d and abook_channel = %d",
|
$r = q("UPDATE abook set abook_flags = (abook_flags %s %d) where abook_id = %d and abook_channel = %d",
|
||||||
|
db_getfunc('^'),
|
||||||
intval($flag),
|
intval($flag),
|
||||||
intval($abook['abook_id']),
|
intval($abook['abook_id']),
|
||||||
intval($abook['abook_channel'])
|
intval($abook['abook_channel'])
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
// if unsetting the archive bit, update the timestamps so we'll try to connect for an additional 30 days.
|
// if unsetting the archive bit, update the timestamps so we'll try to connect for an additional 30 days.
|
||||||
|
|
||||||
if(($flag === ABOOK_FLAG_ARCHIVED) && ($abook['abook_flags'] & ABOOK_FLAG_ARCHIVED)) {
|
if(($flag === ABOOK_FLAG_ARCHIVED) && ($abook['abook_flags'] & ABOOK_FLAG_ARCHIVED)) {
|
||||||
|
Reference in New Issue
Block a user