]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/apisearchjson.php
Merge commit 'refs/merge-requests/164' of git://gitorious.org/statusnet/mainline...
[quix0rs-gnu-social.git] / actions / apisearchjson.php
index e44634684ddcd71e3397344fa8915f6a16f38990..dd442b7f24925c5d99f50204d4ae0ec7eda044c7 100644 (file)
@@ -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;