From e28b143fb6f6dfe7f1d8e6f0f2dee1184e1b85b7 Mon Sep 17 00:00:00 2001 From: Friendika Date: Mon, 31 Oct 2011 20:54:24 -0700 Subject: [PATCH] perform poco_load --- include/poller.php | 15 +++++++++++++++ include/socgraph.php | 1 + 2 files changed, 16 insertions(+) diff --git a/include/poller.php b/include/poller.php index f81e879b42..92594568ed 100644 --- a/include/poller.php +++ b/include/poller.php @@ -24,6 +24,7 @@ function poller_run($argv, $argc){ require_once('include/items.php'); require_once('include/Contact.php'); require_once('include/email.php'); + require_once('include/socgraph.php'); load_config('config'); load_config('system'); @@ -528,6 +529,20 @@ function poller_run($argv, $argc){ intval($contact['id']) ); + + // load current friends if possible. + + if($contact['poco']) { + $r = q("SELECT count(*) as total from glink + where `cid` = %d and updated > UTC_TIMESTAMP() - INTERVAL 1 DAY", + intval($contact['id']) + ); + } + if(count($r)) { + if(! $r[0]['total']) + poco_load($contact['id'],$importer_uid,$contact['poco']); + } + // loop - next contact } } diff --git a/include/socgraph.php b/include/socgraph.php index 56de83af07..17cf3fcd5d 100644 --- a/include/socgraph.php +++ b/include/socgraph.php @@ -1,5 +1,6 @@