]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/jsonsearchresultslist.php
use the new maxNoticeLength and maxUrlLength functionality introduced in commit 14adb...
[quix0rs-gnu-social.git] / lib / jsonsearchresultslist.php
index a315d0abd7b2a456407ebf14f92bc95ed385ab46..0d72ddf7ab48184e41c371407ae9efefe6c940ea 100644 (file)
@@ -27,7 +27,7 @@
  * @link      http://status.net/
  */
 
-if (!defined('STATUSNET')) {
+if (!defined('STATUSNET') && !defined('LACONICA')) {
     exit(1);
 }
 
@@ -105,8 +105,14 @@ class JSONSearchResultsList
                 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);