diff options
author | Sarven Capadisli <csarven@controlyourself.ca> | 2009-07-01 00:50:19 +0000 |
---|---|---|
committer | Sarven Capadisli <csarven@controlyourself.ca> | 2009-07-01 00:50:19 +0000 |
commit | 6c28a07cf58120e271de6e0c9c89a1f9a6d0101e (patch) | |
tree | 26683f5909d96ab00a5cb6d8e58f374fa99db0ee /actions/noticesearchrss.php | |
parent | 015492daace57361c3cdfe91feafdbeb2d2cf6bd (diff) | |
parent | fbb7757c4b546bee7b2bf224e5544f7af3fa7d94 (diff) |
Merge branch '0.8.x' of git@gitorious.org: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; |