load_hooks();
logger('onepoll: start');
-
+
$manual_id = 0;
$generation = 0;
$hub_update = false;
logger('onepoll: no contact');
return;
}
-
+
+ // Test
+ $lockpath = get_config('system','lockpath');
+ if ($lockpath != '') {
+ $pidfile = new pidfile($lockpath, 'onepoll'.$contact_id.'.lck');
+ if($pidfile->is_already_running()) {
+ logger("onepoll: Already running for contact ".$contact_id);
+ exit;
+ }
+ }
+
$d = datetime_convert();
$contacts = q("SELECT `contact`.* FROM `contact`
WHERE ( `rel` = %d OR `rel` = %d ) AND `poll` != ''
- AND NOT `network` IN ( '%s', '%s' )
+ AND NOT `network` IN ( '%s', '%s', '%s' )
AND `contact`.`id` = %d
AND `self` = 0 AND `contact`.`blocked` = 0 AND `contact`.`readonly` = 0
AND `contact`.`archive` = 0 LIMIT 1",
intval(CONTACT_IS_FRIEND),
dbesc(NETWORK_DIASPORA),
dbesc(NETWORK_FACEBOOK),
+ dbesc(NETWORK_PUMPIO),
intval($contact_id)
);
elseif($contact['network'] === NETWORK_FACEBOOK) {
// This is picked up by the Facebook plugin on a cron hook.
// Ignored here.
+ } elseif($contact['network'] === NETWORK_PUMPIO) {
+ // This is picked up by the pump.io plugin on a cron hook.
+ // Ignored here.
}
if($xml) {
// do it twice. Ensures that children of parents which may be later in the stream aren't tossed
-
+
consume_feed($xml,$importer,$contact,$hub,1,2);
$hubmode = 'subscribe';