exit(1);
}
-require_once INSTALLDIR.'/lib/apiprivateauth.php';
-
/**
* Action for outputting search results in Twitter compatible Atom
* format.
*/
function prepare($args)
{
- common_debug("in apisearchatom prepare()");
-
parent::prepare($args);
$this->query = $this->trimmed('q');
$this->page = 1;
}
- // TODO: Suppport since_id -- we need to tweak the backend
+ // TODO: Suppport max_id -- we need to tweak the backend
// Search classes to support it.
$this->since_id = $this->trimmed('since_id');
$this->max_id = $notice->id;
}
+ if ($this->since_id && $notice->id <= $this->since_id) {
+ break;
+ }
+
if ($cnt > $this->rpp) {
break;
}
$source = null;
$ns = $notice->getSource();
- if ($ns) {
+ if ($ns instanceof Notice_source) {
if (!empty($ns->name) && !empty($ns->url)) {
$source = '<a href="'
. htmlspecialchars($ns->url)