]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/jsonsearchresultslist.php
For good measure, don't return autocomplete results when not logged in.
[quix0rs-gnu-social.git] / lib / jsonsearchresultslist.php
index 569bfa87344c8997149d39c37ae70f139980d91a..80d4036aad54694e851a4d84d6f2df215c5ddfe1 100644 (file)
@@ -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);