X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=lib%2Fjsonsearchresultslist.php;h=80d4036aad54694e851a4d84d6f2df215c5ddfe1;hb=119d0f7dbab40f30170ba263de78d7e9cea984db;hp=f17db334b6abb8cb7291d9e13a5cbdc08e4ec516;hpb=ae883ceb9b4689f6c1dd3aecdc4a844eda7d179a;p=quix0rs-gnu-social.git diff --git a/lib/jsonsearchresultslist.php b/lib/jsonsearchresultslist.php index f17db334b6..80d4036aad 100644 --- a/lib/jsonsearchresultslist.php +++ b/lib/jsonsearchresultslist.php @@ -27,7 +27,7 @@ * @link http://status.net/ */ -if (!defined('LACONICA')) { +if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); } @@ -101,12 +101,22 @@ class JSONSearchResultsList $this->max_id = (int)$this->notice->id; } + if ($this->since_id && $this->notice->id <= $this->since_id) { + break; + } + if ($cnt > $this->rpp) { break; } - $item = new ResultItem($this->notice); - array_push($this->results, $item); + $profile = $this->notice->getProfile(); + + // Don't show notices from deleted users + + if (!empty($profile)) { + $item = new ResultItem($this->notice); + array_push($this->results, $item); + } } $time_end = microtime(true);