diff options
author | Zach Copley <zach@status.net> | 2010-01-06 13:40:28 -0800 |
---|---|---|
committer | Zach Copley <zach@status.net> | 2010-01-06 13:43:46 -0800 |
commit | d6db8e58170e6e78a0fd67d50f7fea5d95b5d9c8 (patch) | |
tree | a3b60a921e9a140fa6a732df844e6af34972038b | |
parent | bbbec435b02340b38aac8facf90f43868e2af144 (diff) |
Don't output notices from deleted users.
-rw-r--r-- | actions/twitapisearchatom.php | 9 | ||||
-rw-r--r-- | lib/jsonsearchresultslist.php | 10 |
2 files changed, 16 insertions, 3 deletions
diff --git a/actions/twitapisearchatom.php b/actions/twitapisearchatom.php index 1cb8d7efe..baed2a0c7 100644 --- a/actions/twitapisearchatom.php +++ b/actions/twitapisearchatom.php @@ -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(); diff --git a/lib/jsonsearchresultslist.php b/lib/jsonsearchresultslist.php index 569bfa873..0d72ddf7a 100644 --- a/lib/jsonsearchresultslist.php +++ b/lib/jsonsearchresultslist.php @@ -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); |