summaryrefslogtreecommitdiff
path: root/actions
diff options
context:
space:
mode:
Diffstat (limited to 'actions')
-rw-r--r--actions/all.php6
-rw-r--r--actions/allrss.php10
-rw-r--r--actions/twitapistatuses.php4
3 files changed, 8 insertions, 12 deletions
diff --git a/actions/all.php b/actions/all.php
index 3d3d1c356..0f8cf587c 100644
--- a/actions/all.php
+++ b/actions/all.php
@@ -78,11 +78,11 @@ class AllAction extends StreamAction {
$page = 1;
}
- $notice = $user->noticesWithFriends($page);
+ $notice = $user->noticesWithFriends(($page-1)*NOTICES_PER_PAGE, NOTICES_PER_PAGE + 1);
+
# XXX: revisit constant scope
- $notice->limit((($page-1)*NOTICES_PER_PAGE), NOTICES_PER_PAGE + 1);
-
+ $cnt = $notice->find();
if ($cnt > 0) {
common_element_start('ul', array('id' => 'notices'));
diff --git a/actions/allrss.php b/actions/allrss.php
index a64b47641..b6701cfdc 100644
--- a/actions/allrss.php
+++ b/actions/allrss.php
@@ -43,13 +43,11 @@ class AllrssAction extends Rss10Action {
$user = $this->user;
- $notice = $user->noticesWithFriends();
+ $notice = $user->noticesWithFriends(0, $limit);
+
+ # XXX: revisit constant scope
- if ($limit != 0) {
- $notice->limit(0, $limit);
- }
-
- $notice->find();
+ $cnt = $notice->find();
while ($notice->fetch()) {
$notices[] = clone($notice);
diff --git a/actions/twitapistatuses.php b/actions/twitapistatuses.php
index 749f2f084..56a8199b7 100644
--- a/actions/twitapistatuses.php
+++ b/actions/twitapistatuses.php
@@ -223,9 +223,7 @@ class TwitapistatusesAction extends TwitterapiAction {
$link = common_local_url('all', array('nickname' => $user->nickname));
$subtitle = sprintf(_("Updates from %s and friends on %s!"), $user->nickname, $sitename);
- $notice->$user->noticesWithFriends();
-
- $notice->limit((($page-1)*20), $count);
+ $notice->$user->noticesWithFriends(($page-1)*20, $count);
$cnt = $notice->find();