summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvan Prodromou <evan@prodromou.name>2008-07-07 03:27:54 -0400
committerEvan Prodromou <evan@prodromou.name>2008-07-07 03:27:54 -0400
commit33f0d97cf62c7c95f2f4b6ea52044be75e39230c (patch)
tree2fc7b562effab3b8c0522b8866274848225ae689
parent88ea4ddd2d0876022d3720c647e695dedbaf456d (diff)
shorter replies rss
darcs-hash:20080707072754-84dde-861d5d2b0a75097042e8f8c13a80c68ba3a0edba.gz
-rw-r--r--actions/repliesrss.php23
1 files changed, 9 insertions, 14 deletions
diff --git a/actions/repliesrss.php b/actions/repliesrss.php
index 923ed34f8..b5e271585 100644
--- a/actions/repliesrss.php
+++ b/actions/repliesrss.php
@@ -45,7 +45,7 @@ class RepliesrssAction extends Rss10Action {
$notices = array();
$reply = new Reply();
- $reply->profile_id = $this->user->id;
+ $reply->profile_id = $user->id;
$reply->orderBy('modified DESC');
if ($limit) {
$reply->limit(0, $limit);
@@ -53,20 +53,15 @@ class RepliesrssAction extends Rss10Action {
$cnt = $reply->find();
- if ($cnt > 0) {
- for ($i = 0; $i < min($cnt, NOTICES_PER_PAGE); $i++) {
- if ($reply->fetch()) {
- $notice = new Notice();
- $notice->id = $reply->notice_id;
- $result = $notice->find(true);
- if (!$result) {
- continue;
- }
- $notices[] = clone($notice);
- } else {
- // shouldn't happen!
- break;
+ if ($cnt) {
+ while ($reply->fetch()) {
+ $notice = new Notice();
+ $notice->id = $reply->notice_id;
+ $result = $notice->find(true);
+ if (!$result) {
+ continue;
}
+ $notices[] = clone($notice);
}
}