diff options
author | Thomas Willingham <beardyunixer@beardyunixer.com> | 2014-06-22 18:00:23 +0100 |
---|---|---|
committer | Thomas Willingham <beardyunixer@beardyunixer.com> | 2014-06-22 18:00:23 +0100 |
commit | 388872949ed0de4cf036e546fafb3f4b4bd04fee (patch) | |
tree | 2fcefc5c8f2398166b8e7003033fe160cb3325fc /include/Contact.php | |
parent | b47ff712deafdb8617599b0af4403b9563c9be93 (diff) | |
parent | 301c7cdb89b13c4fc7c502795f121e13c1f9441d (diff) | |
download | volse-hubzilla-388872949ed0de4cf036e546fafb3f4b4bd04fee.tar.gz volse-hubzilla-388872949ed0de4cf036e546fafb3f4b4bd04fee.tar.bz2 volse-hubzilla-388872949ed0de4cf036e546fafb3f4b4bd04fee.zip |
Merge branch 'master' of https://github.com/friendica/red
Diffstat (limited to 'include/Contact.php')
-rw-r--r-- | include/Contact.php | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/include/Contact.php b/include/Contact.php index ffee5096a..787612c83 100644 --- a/include/Contact.php +++ b/include/Contact.php @@ -133,6 +133,19 @@ function abook_toggle_flag($abook,$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. + + if(($flag === ABOOK_FLAG_ARCHIVED) && ($abook['abook_flags'] & ABOOK_FLAG_ARCHIVED)) { + $r = q("update abook set abook_connected = '%s', abook_updated = '%s' + where abook_id = %d and abook_channel = %d limit 1", + dbesc(datetime_convert()), + dbesc(datetime_convert()), + intval($abook['abook_id']), + intval($abook['abook_channel']) + ); + } + $a = get_app(); if($a->data['abook']) $a->data['abook']['abook_flags'] = $a->data['abook']['abook_flags'] ^ $flag; |