]> git.mxchange.org Git - friendica.git/commitdiff
perform poco_load
authorFriendika <info@friendika.com>
Tue, 1 Nov 2011 03:54:24 +0000 (20:54 -0700)
committerFriendika <info@friendika.com>
Tue, 1 Nov 2011 03:54:24 +0000 (20:54 -0700)
include/poller.php
include/socgraph.php

index f81e879b424f4653a20cf376f434e74180f96240..92594568ed65aedb9652923a2270a02b800f0c31 100644 (file)
@@ -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
                }
        }
index 56de83af070268328f8281fd1b93d393a767ea89..17cf3fcd5d9cf8597949977706c2379d115ea411 100644 (file)
@@ -1,5 +1,6 @@
 <?php
 
+require_once('include/datetime.php');
 
 
 /*