diff options
author | Paolo T <tuscanhobbit@users.noreply.github.com> | 2014-09-02 13:15:59 +0200 |
---|---|---|
committer | Paolo T <tuscanhobbit@users.noreply.github.com> | 2014-09-02 13:15:59 +0200 |
commit | fee5b6bd1599599da2f3b662f04b9651b23fb4e4 (patch) | |
tree | e4ab47f657ce1e6ae0aabf6be51bdf169e4b389d /include/onepoll.php | |
parent | a1f85cda3ec0e6fc1c661ee12b1e7d87b3f242c5 (diff) | |
parent | 9dac46ca25b11f80dded42db31e7e062fc7b5142 (diff) | |
download | volse-hubzilla-fee5b6bd1599599da2f3b662f04b9651b23fb4e4.tar.gz volse-hubzilla-fee5b6bd1599599da2f3b662f04b9651b23fb4e4.tar.bz2 volse-hubzilla-fee5b6bd1599599da2f3b662f04b9651b23fb4e4.zip |
Merge pull request #2 from friendica/master
Merge from main project
Diffstat (limited to 'include/onepoll.php')
-rw-r--r-- | include/onepoll.php | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/include/onepoll.php b/include/onepoll.php index e81d8bcf7..d64785f92 100644 --- a/include/onepoll.php +++ b/include/onepoll.php @@ -35,10 +35,12 @@ function onepoll_run($argv, $argc){ FROM abook LEFT JOIN account on abook_account = account_id left join xchan on xchan_hash = abook_xchan where abook_id = %d AND (( abook_flags & %d ) OR ( abook_flags = %d )) + AND NOT ( abook_flags & %d ) AND (( account_flags = %d ) OR ( account_flags = %d )) limit 1", intval($contact_id), - intval(ABOOK_FLAG_HIDDEN|ABOOK_FLAG_PENDING|ABOOK_FLAG_UNCONNECTED), + intval(ABOOK_FLAG_HIDDEN|ABOOK_FLAG_PENDING|ABOOK_FLAG_UNCONNECTED|ABOOK_FLAG_FEED), intval(0), + intval(ABOOK_FLAG_ARCHIVED|ABOOK_FLAG_BLOCKED|ABOOK_FLAG_IGNORED), intval(ACCOUNT_OK), intval(ACCOUNT_UNVERIFIED) ); @@ -70,6 +72,19 @@ function onepoll_run($argv, $argc){ : datetime_convert('UTC','UTC',$contact['abook_updated'] . ' - 2 days') ); + if($contact['xchan_network'] === 'rss') { + logger('onepoll: processing feed ' . $contact['xchan_name'], LOGGER_DEBUG); + handle_feed($importer['channel_id'],$contact_id,$contact['xchan_hash']); + q("update abook set abook_connected = '%s' where abook_id = %d limit 1", + dbesc(datetime_convert()), + intval($contact['abook_id']) + ); + return; + } + + if($contact['xchan_network'] !== 'zot') + return; + // update permissions $x = zot_refresh($contact,$importer); @@ -128,11 +143,9 @@ function onepoll_run($argv, $argc){ } } - // fetch some items // set last updated timestamp - if($contact['xchan_connurl']) { $r = q("SELECT xlink_id from xlink where xlink_xchan = '%s' and xlink_updated > UTC_TIMESTAMP() - INTERVAL 1 DAY limit 1", |