]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - classes/Foreign_link.php
Merge branch 'takeshitakenji/gnu-social-twitter-repeat-config' into mmn_fixes
[quix0rs-gnu-social.git] / classes / Foreign_link.php
index 6e050d0c94d6d0d2d4a554ae3cebf563cc194095..8388f12e72fc192b6b62edf0d5e6c4da45013266 100644 (file)
@@ -89,7 +89,7 @@ class Foreign_link extends Managed_DataObject
         return $flink;
     }
 
-    function set_flags($noticesend, $noticerecv, $replysync, $friendsync)
+    function set_flags($noticesend, $noticerecv, $replysync, $repeatsync, $friendsync)
     {
         if ($noticesend) {
             $this->noticesync |= FOREIGN_NOTICE_SEND;
@@ -109,6 +109,12 @@ class Foreign_link extends Managed_DataObject
             $this->noticesync &= ~FOREIGN_NOTICE_SEND_REPLY;
         }
 
+        if ($repeatsync) {
+            $this->noticesync |= FOREIGN_NOTICE_SEND_REPEAT;
+        } else {
+            $this->noticesync &= ~FOREIGN_NOTICE_SEND_REPEAT;
+        }
+
         if ($friendsync) {
             $this->friendsync |= FOREIGN_FRIEND_RECV;
         } else {
@@ -136,12 +142,12 @@ class Foreign_link extends Managed_DataObject
 
     function getUser()
     {
-        return User::getKV($this->user_id);
+        return Profile::getByID($this->user_id)->getUser();
     }
 
     function getProfile()
     {
-        return Profile::getKV('id', $this->user_id);
+        return Profile::getByID($this->user_id);
     }
 
     // Make sure we only ever delete one record at a time