]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/jsonsearchresultslist.php
Merge branch 'diskcache' into 0.9.x
[quix0rs-gnu-social.git] / lib / jsonsearchresultslist.php
index 7ff32f829f76b50dea9a54ae9f993b11a8269f71..0d72ddf7ab48184e41c371407ae9efefe6c940ea 100644 (file)
  *
  * @category  Search
  * @package   StatusNet
- * @author    Zach Copley <zach@controlyourself.ca>
+ * @author    Zach Copley <zach@status.net>
  * @copyright 2009 StatusNet, Inc.
  * @license   http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
  * @link      http://status.net/
  */
 
-if (!defined('LACONICA')) {
+if (!defined('STATUSNET') && !defined('LACONICA')) {
     exit(1);
 }
 
@@ -36,7 +36,7 @@ if (!defined('LACONICA')) {
  *
  * @category Search
  * @package  StatusNet
- * @author   Zach Copley <zach@controlyourself.ca>
+ * @author   Zach Copley <zach@status.net>
  * @license  http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
  * @link     http://status.net/
  *
@@ -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);
@@ -148,7 +154,7 @@ class JSONSearchResultsList
  *
  * @category UI
  * @package  StatusNet
- * @author   Zach Copley <zach@controlyourself.ca>
+ * @author   Zach Copley <zach@status.net>
  * @license  http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
  * @link     http://status.net/
  * @see      JSONSearchResultsList