From: Mikael Nordfeldth <mmn@hethane.se>
Date: Tue, 15 Oct 2013 00:15:58 +0000 (+0200)
Subject: Moved favoriteNotices from User to Profile class
X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=4e8d7795d02008ab57703c1774ddf2a67edff8bf;p=quix0rs-gnu-social.git

Moved favoriteNotices from User to Profile class
---

diff --git a/classes/Profile.php b/classes/Profile.php
index 5058fbce68..cafaec5a3d 100644
--- a/classes/Profile.php
+++ b/classes/Profile.php
@@ -753,6 +753,11 @@ class Profile extends Managed_DataObject
         return $cnt;
     }
 
+    function favoriteNotices($own=false, $offset=0, $limit=NOTICES_PER_PAGE, $since_id=0, $max_id=0)
+    {
+        return Fave::stream($this->id, $offset, $limit, $own, $since_id, $max_id);
+    }
+
     function noticeCount()
     {
         $c = Cache::instance();
diff --git a/classes/User.php b/classes/User.php
index 59cb4e1890..00a2319cfe 100644
--- a/classes/User.php
+++ b/classes/User.php
@@ -535,7 +535,7 @@ class User extends Managed_DataObject
 
     function favoriteNotices($own=false, $offset=0, $limit=NOTICES_PER_PAGE, $since_id=0, $max_id=0)
     {
-        return Fave::stream($this->id, $offset, $limit, $own, $since_id, $max_id);
+        return $this->getProfile()->favoriteNotices($own, $offset, $limit, $since_id, $max_id);
     }
 
     function noticeInbox($offset=0, $limit=NOTICES_PER_PAGE, $since_id=0, $before_id=0)