]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/favoritesrss.php
Merge branch '0.9.x' into activityexport
[quix0rs-gnu-social.git] / actions / favoritesrss.php
index 0c6c4b8f9a684f5902819118ae644177abd2ceff..51c92af9339af61c55ab9479b64b7613f288f3b0 100644 (file)
@@ -29,7 +29,7 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-if (!defined('LACONICA')) {
+if (!defined('STATUSNET') && !defined('LACONICA')) {
     exit(1);
 }
 
@@ -50,11 +50,11 @@ require_once INSTALLDIR.'/lib/rssaction.php';
  */
 class FavoritesrssAction extends Rss10Action
 {
-    
+
     /** The user whose favorites to display */
-    
+
     var $user = null;
-        
+
     /**
      * Find the user to display by supplied nickname
      *
@@ -66,7 +66,7 @@ class FavoritesrssAction extends Rss10Action
     function prepare($args)
     {
         parent::prepare($args);
-        
+
         $nickname   = $this->trimmed('nickname');
         $this->user = User::staticGet('nickname', $nickname);
 
@@ -74,10 +74,11 @@ class FavoritesrssAction extends Rss10Action
             $this->clientError(_('No such user.'));
             return false;
         } else {
+            $this->notices = $this->getNotices($this->limit);
             return true;
         }
     }
-    
+
     /**
      * Get notices
      *
@@ -88,7 +89,7 @@ class FavoritesrssAction extends Rss10Action
     function getNotices($limit=0)
     {
         $user    = $this->user;
-        $notice  = $user->favoriteNotices(0, $limit);
+        $notice  = $user->favoriteNotices(false, 0, $limit);
         $notices = array();
         while ($notice->fetch()) {
             $notices[] = clone($notice);