X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Fnoticesearchrss.php;h=2a4b2060d3fa3f2d3781d429f27cbd5a372ce9a3;hb=2934099fbd17281ed00055af654aa5b813d535a2;hp=f6da969ee47bc29a0257ac3772320874a943299c;hpb=3a0c59052ace6cdd1ac23e8f6b5c5ba8cb6fffcd;p=quix0rs-gnu-social.git diff --git a/actions/noticesearchrss.php b/actions/noticesearchrss.php index f6da969ee4..2a4b2060d3 100644 --- a/actions/noticesearchrss.php +++ b/actions/noticesearchrss.php @@ -12,7 +12,7 @@ * @link http://laconi.ca/ * * Laconica - a distributed open-source microblogging tool - * Copyright (C) 2008, Controlez-Vous, Inc. + * Copyright (C) 2008, 2009, Control Yourself, Inc. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published by @@ -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;