refresh now works on poller runs
This commit is contained in:
parent
83db4abaab
commit
2d113f0c87
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
require_once('boot.php');
|
require_once('boot.php');
|
||||||
require_once('include/cli_startup.php');
|
require_once('include/cli_startup.php');
|
||||||
|
require_once('include/zot.php');
|
||||||
|
|
||||||
function onepoll_run($argv, $argc){
|
function onepoll_run($argv, $argc){
|
||||||
|
|
||||||
@ -30,19 +30,17 @@ function onepoll_run($argv, $argc){
|
|||||||
$d = datetime_convert();
|
$d = datetime_convert();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$contacts = q("SELECT abook.*, xchan.*, account.*
|
$contacts = q("SELECT abook.*, xchan.*, account.*
|
||||||
FROM abook LEFT JOIN account on abook_account = account_id left join xchan on xchan_hash = abook_xchan
|
FROM abook LEFT JOIN account on abook_account = account_id left join xchan on xchan_hash = abook_xchan
|
||||||
where abook_id = %d
|
where abook_id = %d
|
||||||
AND not ( abook_flags & %d ) AND not ( abook_flags & %d )
|
AND (( abook_flags = %d ) OR ( abook_flags = %d ))
|
||||||
AND not ( abook_flags & %d ) AND not ( abook_flags & %d )
|
AND (( account_flags = %d ) OR ( account_flags = %d )) ORDER BY RAND()",
|
||||||
AND not ( abook_flags & %d ) AND ( account_flags & %d ) $abandon_sql ORDER BY RAND()",
|
|
||||||
intval($contact_id),
|
intval($contact_id),
|
||||||
intval(ABOOK_FLAG_BLOCKED),
|
intval(ABOOK_FLAG_HIDDEN),
|
||||||
intval(ABOOK_FLAG_IGNORED),
|
intval(0),
|
||||||
intval(ABOOK_FLAG_PENDING),
|
intval(ACCOUNT_OK),
|
||||||
intval(ABOOK_FLAG_ARCHIVED),
|
intval(ACCOUNT_UNVERIFIED)
|
||||||
intval(ABOOK_FLAG_SELF),
|
|
||||||
intval(ACCOUNT_OK)
|
|
||||||
);
|
);
|
||||||
|
|
||||||
if(! $contacts) {
|
if(! $contacts) {
|
||||||
@ -62,6 +60,7 @@ function onepoll_run($argv, $argc){
|
|||||||
$r = q("SELECT * from channel left join xchan on channel_hash = xchan_hash where channel_id = %d limit 1",
|
$r = q("SELECT * from channel left join xchan on channel_hash = xchan_hash where channel_id = %d limit 1",
|
||||||
intval($importer_uid)
|
intval($importer_uid)
|
||||||
);
|
);
|
||||||
|
|
||||||
if(! $r)
|
if(! $r)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -103,18 +103,15 @@ function poller_run($argv, $argc){
|
|||||||
);
|
);
|
||||||
|
|
||||||
$contacts = q("SELECT abook_id, abook_updated, abook_closeness, abook_channel
|
$contacts = q("SELECT abook_id, abook_updated, abook_closeness, abook_channel
|
||||||
FROM abook LEFT JOIN account on abook_account = account_id
|
FROM abook LEFT JOIN account on abook_account = account_id where 1
|
||||||
$sql_extra
|
$sql_extra
|
||||||
AND not ( abook_flags & %d ) AND not ( abook_flags & %d )
|
AND (( abook_flags = %d ) OR ( abook_flags = %d ))
|
||||||
AND not ( abook_flags & %d ) AND not ( abook_flags & %d )
|
AND (( account_flags = %d ) OR ( account_flags = %d )) $abandon_sql ORDER BY RAND()",
|
||||||
AND not ( abook_flags & %d ) AND ( account_flags & %d ) $abandon_sql ORDER BY RAND()",
|
|
||||||
|
|
||||||
intval(ABOOK_FLAG_BLOCKED),
|
intval(ABOOK_FLAG_HIDDEN),
|
||||||
intval(ABOOK_FLAG_IGNORED),
|
intval(0),
|
||||||
intval(ABOOK_FLAG_PENDING),
|
intval(ACCOUNT_OK),
|
||||||
intval(ABOOK_FLAG_ARCHIVED),
|
intval(ACCOUNT_UNVERIFIED) // FIXME
|
||||||
intval(ABOOK_FLAG_SELF),
|
|
||||||
intval(ACCOUNT_OK)
|
|
||||||
|
|
||||||
);
|
);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user