]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - classes/User.php
Merge branch 'testing' of gitorious.org:statusnet/mainline into 0.9.x
[quix0rs-gnu-social.git] / classes / User.php
index 2c256301c2f2d94a1cc36f4b079e9dd71b4352fc..2abb7eeb69319ae8956e2dc64882f32c9b39a2fb 100644 (file)
@@ -464,9 +464,9 @@ class User extends Memcached_DataObject
         return $profile->getNotices($offset, $limit, $since_id, $before_id);
     }
 
-    function favoriteNotices($offset=0, $limit=NOTICES_PER_PAGE, $own=false)
+    function favoriteNotices($own=false, $offset=0, $limit=NOTICES_PER_PAGE, $since_id=0, $max_id=0)
     {
-        $ids = Fave::stream($this->id, $offset, $limit, $own);
+        $ids = Fave::stream($this->id, $offset, $limit, $own, $since_id, $max_id);
         return Notice::getStreamByIds($ids);
     }
 
@@ -548,7 +548,10 @@ class User extends Memcached_DataObject
             return false;
         }
 
-        Subscription::cancel($other, $this->getProfile());
+        $self = $this->getProfile();
+        if (Subscription::exists($other, $self)) {
+            Subscription::cancel($other, $self);
+        }
 
         $block->query('COMMIT');