<?php
/**
- * Laconica, the distributed open-source microblogging tool
+ * StatusNet, the distributed open-source microblogging tool
*
* Action for showing Twitter-like JSON search results
*
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* @category Search
- * @package Laconica
+ * @package StatusNet
* @author Zach Copley <zach@controlyourself.ca>
- * @copyright 2008-2009 Control Yourself, Inc.
+ * @copyright 2008-2009 StatusNet, Inc.
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
* @link http://laconi.ca/
*/
* Action handler for Twitter-compatible API search
*
* @category Search
- * @package Laconica
+ * @package StatusNet
* @author Zach Copley <zach@controlyourself.ca>
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
* @link http://laconi.ca/
$search_engine = $notice->getSearchEngine('identica_notices');
$search_engine->set_sort_mode('chron');
$search_engine->limit(($this->page - 1) * $this->rpp, $this->rpp + 1, true);
- $search_engine->query($q);
- $cnt = $notice->find();
+ if (false === $search_engine->query($q)) {
+ $cnt = 0;
+ } else {
+ $cnt = $notice->find();
+ }
// TODO: since_id, lang, geocode
{
return true;
}
-}
\ No newline at end of file
+}