diff options
author | Zach Copley <zach@status.net> | 2010-05-05 14:46:36 -0700 |
---|---|---|
committer | Zach Copley <zach@status.net> | 2010-05-05 14:46:36 -0700 |
commit | b50f300566143837aba3739d62caf679ec19727e (patch) | |
tree | 152f809555ade259ac5488243e2433c223f6ae7e /actions/apitimelinefavorites.php | |
parent | c2bda7726c05c6c7f5ef4f9519e56f107bc4e1e5 (diff) |
Implement since_id and max_id param handling for /api/favorites
Diffstat (limited to 'actions/apitimelinefavorites.php')
-rw-r--r-- | actions/apitimelinefavorites.php | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/actions/apitimelinefavorites.php b/actions/apitimelinefavorites.php index 8cb2e808d..79632447e 100644 --- a/actions/apitimelinefavorites.php +++ b/actions/apitimelinefavorites.php @@ -185,17 +185,23 @@ class ApiTimelineFavoritesAction extends ApiBareAuthAction { $notices = array(); + common_debug("since id = " . $this->since_id . " max id = " . $this->max_id); + if (!empty($this->auth_user) && $this->auth_user->id == $this->user->id) { $notice = $this->user->favoriteNotices( + true, ($this->page-1) * $this->count, $this->count, - true + $this->since_id, + $this->max_id ); } else { $notice = $this->user->favoriteNotices( + false, ($this->page-1) * $this->count, $this->count, - false + $this->since_id, + $this->max_id ); } |