summaryrefslogtreecommitdiff
path: root/actions/twitapistatuses.php
diff options
context:
space:
mode:
authorEvan Prodromou <evan@prodromou.name>2008-07-18 01:25:57 -0400
committerEvan Prodromou <evan@prodromou.name>2008-07-18 01:25:57 -0400
commit44dccacb1c9345a3bb22286880ec6df3d6fd3158 (patch)
tree9f951d05dc828234eec9604136c6aaec55dd670d /actions/twitapistatuses.php
parent0adb1f69707927c7aae245a80fcc3ec12cd05db3 (diff)
pages and limits
darcs-hash:20080718052557-84dde-65d7411377b866a66474584e90dc08ea3eb432b0.gz
Diffstat (limited to 'actions/twitapistatuses.php')
-rw-r--r--actions/twitapistatuses.php14
1 files changed, 8 insertions, 6 deletions
diff --git a/actions/twitapistatuses.php b/actions/twitapistatuses.php
index a384cc75b..96931fec6 100644
--- a/actions/twitapistatuses.php
+++ b/actions/twitapistatuses.php
@@ -639,24 +639,26 @@ class TwitapistatusesAction extends TwitterapiAction {
$user = $this->get_subs_user($apidata);
# XXX: id
- # XXX: page
# XXX: lite
+ $page = $this->trimmed('page');
+
+ if (!$page || !is_numeric($page)) {
+ $page = 1;
+ }
+
$profile = $user->getProfile();
if (!$profile) {
common_server_error(_('User has no profile.'));
return;
}
-
- if (!$page) {
- $page = 1;
- }
$sub = new Subscription();
$sub->$user_attr = $profile->id;
$sub->orderBy('created DESC');
-
+ $sub->limit(($page-1)*100, 100);
+
$others = array();
if ($sub->find()) {