forked from GNUsocial/gnu-social
		
	Merge branch 'master' into 0.9.x
This commit is contained in:
		| @@ -114,7 +114,7 @@ class ApiSearchAtomAction extends ApiPrivateAuthAction | |||||||
|             $this->page = 1; |             $this->page = 1; | ||||||
|         } |         } | ||||||
|  |  | ||||||
|         // TODO: Suppport since_id -- we need to tweak the backend |         // TODO: Suppport max_id -- we need to tweak the backend | ||||||
|         // Search classes to support it. |         // Search classes to support it. | ||||||
|  |  | ||||||
|         $this->since_id = $this->trimmed('since_id'); |         $this->since_id = $this->trimmed('since_id'); | ||||||
| @@ -177,6 +177,10 @@ class ApiSearchAtomAction extends ApiPrivateAuthAction | |||||||
|                     $this->max_id = $notice->id; |                     $this->max_id = $notice->id; | ||||||
|                 } |                 } | ||||||
|  |  | ||||||
|  |                 if ($this->since_id && $notice->id <= $this->since_id) { | ||||||
|  |                     break; | ||||||
|  |                 } | ||||||
|  |  | ||||||
|                 if ($cnt > $this->rpp) { |                 if ($cnt > $this->rpp) { | ||||||
|                     break; |                     break; | ||||||
|                 } |                 } | ||||||
|   | |||||||
| @@ -85,6 +85,9 @@ class ApiSearchJSONAction extends ApiPrivateAuthAction | |||||||
|             $this->page = 1; |             $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->since_id = $this->trimmed('since_id'); | ||||||
|         $this->geocode  = $this->trimmed('geocode'); |         $this->geocode  = $this->trimmed('geocode'); | ||||||
|  |  | ||||||
| @@ -127,9 +130,9 @@ class ApiSearchJSONAction extends ApiPrivateAuthAction | |||||||
|             $cnt = $notice->find(); |             $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'); |         $this->initDocument('json'); | ||||||
|         $results->show(); |         $results->show(); | ||||||
|   | |||||||
| @@ -101,6 +101,10 @@ class JSONSearchResultsList | |||||||
|                 $this->max_id = (int)$this->notice->id; |                 $this->max_id = (int)$this->notice->id; | ||||||
|             } |             } | ||||||
|  |  | ||||||
|  |             if ($this->since_id && $this->notice->id <= $this->since_id) { | ||||||
|  |                 break; | ||||||
|  |             } | ||||||
|  |  | ||||||
|             if ($cnt > $this->rpp) { |             if ($cnt > $this->rpp) { | ||||||
|                 break; |                 break; | ||||||
|             } |             } | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user