X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Fapisearchjson.php;h=dd442b7f24925c5d99f50204d4ae0ec7eda044c7;hb=8b47400183052873b012dacf4eb5ba841914a886;hp=e44634684ddcd71e3397344fa8915f6a16f38990;hpb=640e7e7c43fa8e9b1a8516b486e560df84bd9887;p=quix0rs-gnu-social.git diff --git a/actions/apisearchjson.php b/actions/apisearchjson.php index e44634684d..dd442b7f24 100644 --- a/actions/apisearchjson.php +++ b/actions/apisearchjson.php @@ -44,7 +44,6 @@ require_once INSTALLDIR.'/lib/jsonsearchresultslist.php'; * @link http://status.net/ * @see ApiAction */ - class ApiSearchJSONAction extends ApiPrivateAuthAction { var $query; @@ -62,7 +61,6 @@ class ApiSearchJSONAction extends ApiPrivateAuthAction * * @return boolean true if nothing goes wrong */ - function prepare($args) { common_debug("apisearchjson prepare()"); @@ -87,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'); @@ -100,7 +101,6 @@ class ApiSearchJSONAction extends ApiPrivateAuthAction * * @return void */ - function handle($args) { parent::handle($args); @@ -112,10 +112,8 @@ class ApiSearchJSONAction extends ApiPrivateAuthAction * * @return void */ - function showResults() { - // TODO: Support search operators like from: and to:, boolean, etc. $notice = new Notice(); @@ -132,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(); @@ -146,7 +144,6 @@ class ApiSearchJSONAction extends ApiPrivateAuthAction * * @return boolean true */ - function isReadOnly($args) { return true;