]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/allrss.php
gc inboxes on a regular basis
[quix0rs-gnu-social.git] / actions / allrss.php
index 0114c43962ad312075337ef347010fada0c25a1b..885a67f6188af13b07a0ea7e6bf9a8302078e476 100644 (file)
@@ -13,7 +13,7 @@
  * @link     http://laconi.ca/
  *
  * Laconica - a distributed open-source microblogging tool
- * Copyright (C) 2008, Controlez-Vous, Inc.
+ * Copyright (C) 2008, 2009, Control Yourself, Inc.
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU Affero General Public License as published by
@@ -81,8 +81,17 @@ class AllrssAction extends Rss10Action
      */
     function getNotices($limit=0)
     {
-        $user   = $this->user;
-        $notice = $user->noticesWithFriends(0, $limit);
+        $cur = common_current_user();
+
+        if (!empty($cur) && $cur->id == $user->id) {
+            $notice = $this->user->noticeInbox(0, $limit);
+        } else {
+            $notice = $this->user->noticesWithFriends(0, $limit);
+        }
+
+        $user    = $this->user;
+        $notice  = $user->noticesWithFriends(0, $limit);
+        $notices = array();
 
         while ($notice->fetch()) {
             $notices[] = clone($notice);