logger('complete_conversation: cron_start');
$start = date("Y-m-d H:i:s", time() - ($poll_timeframe * 60));
- $conversations = q("SELECT * FROM `term` WHERE `type` = 7 AND `term` > '%s'",
+ $conversations = q("SELECT * FROM `term` WHERE `type` = 7 AND `term` > '%s'",
dbesc($start));
foreach ($conversations AS $conversation) {
$id = $conversation['oid'];
function complete_conversation($itemid, $conversation_url, $only_add_conversation = false) {
global $a;
+ if (intval(get_config('system','ostatus_poll_interval')) == -2)
+ return;
+
if ($a->last_ostatus_conversation_url == $conversation_url)
return;
if ($message_exists) {
if ($parent["id"] != 0) {
$existing_message = $message_exists[0];
- $r = q("UPDATE `item` SET `parent` = %d, `parent-uri` = '%s', `thr-parent` = '%s' WHERE `id` = %d LIMIT 1",
+ $r = q("UPDATE `item` SET `parent` = %d, `parent-uri` = '%s', `thr-parent` = '%s' WHERE `id` = %d",
intval($parent["id"]),
dbesc($parent["uri"]),
dbesc($parent_uri),