]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Don't output notices from deleted users.
authorZach Copley <zach@status.net>
Wed, 6 Jan 2010 21:40:28 +0000 (13:40 -0800)
committerZach Copley <zach@status.net>
Wed, 6 Jan 2010 21:40:28 +0000 (13:40 -0800)
actions/twitapisearchatom.php
lib/jsonsearchresultslist.php

index 1cb8d7efe6d507ced64fa7597e3683eefac4daee..baed2a0c7c24107cb15731489fc312974ea267c6 100644 (file)
@@ -208,7 +208,14 @@ class TwitapisearchatomAction extends ApiAction
         $this->showFeed();
 
         foreach ($notices as $n) {
-            $this->showEntry($n);
+
+            $profile = $n->getProfile();
+
+            // Don't show notices from deleted users
+
+            if (!empty($profile)) {
+                $this->showEntry($n);
+            }
         }
 
         $this->endAtom();
index 569bfa87344c8997149d39c37ae70f139980d91a..0d72ddf7ab48184e41c371407ae9efefe6c940ea 100644 (file)
@@ -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);