From e0fbf02bbf516db10070bddaabbbaea31d336cda Mon Sep 17 00:00:00 2001 From: Zach Copley Date: Sun, 4 Jan 2009 23:02:12 -0500 Subject: trac750 configurable sync flags for Facebook app (noticesync, replysync) darcs-hash:20090105040212-7b5ce-37f6195649dc673241e4566a93183b13e428d98f.gz --- _darcs/pristine/classes/Foreign_link.php | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to '_darcs/pristine/classes') diff --git a/_darcs/pristine/classes/Foreign_link.php b/_darcs/pristine/classes/Foreign_link.php index c89124d19..afc0e2180 100644 --- a/_darcs/pristine/classes/Foreign_link.php +++ b/_darcs/pristine/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() { -- cgit v1.2.3-54-g00ecf