Ticket #1987: support since_id on API notice search methods.

max_id is not yet implemented, as it'll need support added to the search backends. (since_id we get 'for free' by just cropping off the list, it'll do for now)
This commit is contained in:
Brion Vibber
2010-11-19 14:00:22 -08:00
parent 4b01dd8b2e
commit ca55d6c514
3 changed files with 14 additions and 3 deletions

View File

@@ -85,6 +85,9 @@ class ApiSearchJSONAction extends ApiPrivateAuthAction
$this->page = 1;
}
// TODO: Suppport max_id -- we need to tweak the backend
// Search classes to support it.
$this->since_id = $this->trimmed('since_id');
$this->geocode = $this->trimmed('geocode');
@@ -127,9 +130,9 @@ class ApiSearchJSONAction extends ApiPrivateAuthAction
$cnt = $notice->find();
}
// TODO: since_id, lang, geocode
// TODO: max_id, lang, geocode
$results = new JSONSearchResultsList($notice, $q, $this->rpp, $this->page);
$results = new JSONSearchResultsList($notice, $q, $this->rpp, $this->page, $this->since_id);
$this->initDocument('json');
$results->show();