diff options
author | Evan Prodromou <evan@controlyourself.ca> | 2009-07-01 12:58:49 -0400 |
---|---|---|
committer | Evan Prodromou <evan@controlyourself.ca> | 2009-07-01 12:58:49 -0400 |
commit | 721ba6c88f3c89c3efcc8e5f0c9169d94911825d (patch) | |
tree | f1b07dfc50858d98258a3043e3c6dbf4f00a22e3 /actions/noticesearchrss.php | |
parent | 8a8390c1a78a2586bb2e9e10bfcb3502739d8d76 (diff) | |
parent | 6c28a07cf58120e271de6e0c9c89a1f9a6d0101e (diff) |
Merge branch '0.8.x' of git@gitorious.org:+laconica-developers/laconica/dev into 0.8.x
Diffstat (limited to 'actions/noticesearchrss.php')
-rw-r--r-- | actions/noticesearchrss.php | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/actions/noticesearchrss.php b/actions/noticesearchrss.php index c1bf3bf5f..2a4b2060d 100644 --- a/actions/noticesearchrss.php +++ b/actions/noticesearchrss.php @@ -67,11 +67,16 @@ class NoticesearchrssAction extends Rss10Action if (!$limit) $limit = 20; $search_engine->limit(0, $limit, true); - $search_engine->query($q); - $notice->find(); + if (false === $search_engine->query($q)) { + $cnt = 0; + } else { + $cnt = $notice->find(); + } - while ($notice->fetch()) { - $notices[] = clone($notice); + if ($cnt > 0) { + while ($notice->fetch()) { + $notices[] = clone($notice); + } } return $notices; |