@@ -58,9+58,9 @@ function onepoll_run(&$argv, &$argc){
}
// Test
}
// Test
- $lockpath = get_config('system','lockpath');
+ $lockpath = get_lockpath();
if ($lockpath != '') {
if ($lockpath != '') {
- $pidfile = new pidfile($lockpath, 'onepoll'.$contact_id.'.lck');
+ $pidfile = new pidfile($lockpath, 'onepoll'.$contact_id);
if($pidfile->is_already_running()) {
logger("onepoll: Already running for contact ".$contact_id);
exit;
if($pidfile->is_already_running()) {
logger("onepoll: Already running for contact ".$contact_id);
exit;
@@ -112,7+112,7 @@ function onepoll_run(&$argv, &$argc){
$importer_uid = $contact['uid'];
$importer_uid = $contact['uid'];
- $r = q("SELECT `contact`.*, `user`.`page-flags` FROM `contact` LEFT JOIN `user` on `contact`.`uid` = `user`.`uid` WHERE `user`.`uid` = %d AND `contact`.`self` = 1 LIMIT 1",
+ $r = q("SELECT `contact`.*, `user`.`page-flags` FROM `contact` INNER JOIN `user` on `contact`.`uid` = `user`.`uid` WHERE `user`.`uid` = %d AND `contact`.`self` = 1 LIMIT 1",
intval($importer_uid)
);
if(! count($r))
intval($importer_uid)
);
if(! count($r))
@@ -330,6+330,8 @@ function onepoll_run(&$argv, &$argc){
logger("Mail: Parsing mail ".$msg_uid, LOGGER_DATA);
$datarray = array();
logger("Mail: Parsing mail ".$msg_uid, LOGGER_DATA);