summaryrefslogtreecommitdiff
path: root/actions/noticesearchrss.php
diff options
context:
space:
mode:
authorEvan Prodromou <evan@controlyourself.ca>2009-07-02 08:51:10 -0400
committerEvan Prodromou <evan@controlyourself.ca>2009-07-02 08:51:10 -0400
commit5f9a4ebef493997557ef4470268bed0e5799b6cb (patch)
treef9a06c1773e511d3273c5d9223d06ca0806d5341 /actions/noticesearchrss.php
parente52997e52fe02960908eb6a9637a3349a2c74dad (diff)
parentd04ab14a5a15f9119bedca1332eb516ecf5ca483 (diff)
Merge branch '0.8.x' into queuemanager
Diffstat (limited to 'actions/noticesearchrss.php')
-rw-r--r--actions/noticesearchrss.php13
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;