diff options
author | Zach Copley <zach@controlyourself.ca> | 2009-01-04 23:02:12 -0500 |
---|---|---|
committer | Zach Copley <zach@controlyourself.ca> | 2009-01-04 23:02:12 -0500 |
commit | e0fbf02bbf516db10070bddaabbbaea31d336cda (patch) | |
tree | c44b562a6a8bb73766884f2539928b2fb6209729 /classes/Foreign_link.php | |
parent | fd6f9b9d7622f280f92810770deb217eb7301c14 (diff) |
trac750 configurable sync flags for Facebook app (noticesync, replysync)
darcs-hash:20090105040212-7b5ce-37f6195649dc673241e4566a93183b13e428d98f.gz
Diffstat (limited to 'classes/Foreign_link.php')
-rw-r--r-- | classes/Foreign_link.php | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/classes/Foreign_link.php b/classes/Foreign_link.php index c89124d19..afc0e2180 100644 --- a/classes/Foreign_link.php +++ b/classes/Foreign_link.php @@ -57,6 +57,29 @@ class Foreign_link extends Memcached_DataObject return null; } + function set_flags($noticesync, $replysync, $friendsync) + { + if ($noticesync) { + $this->noticesync |= FOREIGN_NOTICE_SEND; + } else { + $this->noticesync &= ~FOREIGN_NOTICE_SEND; + } + + if ($replysync) { + $this->noticesync |= FOREIGN_NOTICE_SEND_REPLY; + } else { + $this->noticesync &= ~FOREIGN_NOTICE_SEND_REPLY; + } + + if ($friendsync) { + $this->friendsync |= FOREIGN_FRIEND_RECV; + } else { + $this->friendsync &= ~FOREIGN_FRIEND_RECV; + } + + $this->profilesync = 0; + } + # Convenience methods function getForeignUser() { |