]> git.mxchange.org Git - friendica.git/blobdiff - include/onepoll.php
Merge pull request #400 from annando/master
[friendica.git] / include / onepoll.php
index 447881ab71715423dd81fa409ce202d9d917f024..09e7bb7638d85885f1f64ab87984f2ac0abb455f 100644 (file)
@@ -36,11 +36,6 @@ function onepoll_run($argv, $argc){
 
        logger('onepoll: start');
        
-       $abandon_days = intval(get_config('system','account_abandon_days'));
-       if($abandon_days < 1)
-               $abandon_days = 0;
-
-
        $manual_id  = 0;
        $generation = 0;
        $hub_update = false;
@@ -54,9 +49,7 @@ function onepoll_run($argv, $argc){
                logger('onepoll: no contact');
                return;
        }
-
-       if(was_recently_delayed($contact_id))
-               return;
+       
 
        $d = datetime_convert();
 
@@ -64,11 +57,6 @@ function onepoll_run($argv, $argc){
        // and which have a polling address and ignore Diaspora since 
        // we are unable to match those posts with a Diaspora GUID and prevent duplicates.
 
-       $abandon_sql = (($abandon_days) 
-               ? sprintf(" AND `user`.`login_date` > UTC_TIMESTAMP() - INTERVAL %d DAY ", intval($abandon_days)) 
-               : '' 
-       );
-
        $contacts = q("SELECT `contact`.* FROM `contact` 
                WHERE ( `rel` = %d OR `rel` = %d ) AND `poll` != ''
                AND NOT `network` IN ( '%s', '%s' )
@@ -88,7 +76,6 @@ function onepoll_run($argv, $argc){
 
        $contact = $contacts[0];
 
-
        $xml = false;
 
        $t = $contact['last-update'];
@@ -164,6 +151,9 @@ function onepoll_run($argv, $argc){
 
                if(! strstr($handshake_xml,'<?xml')) {
                        logger('poller: response from ' . $url . ' did not contain XML.');
+
+                       mark_for_death($contact);
+
                        $r = q("UPDATE `contact` SET `last-update` = '%s' WHERE `id` = %d LIMIT 1",
                                dbesc(datetime_convert()),
                                intval($contact['id'])
@@ -459,7 +449,7 @@ function onepoll_run($argv, $argc){
 
        if($xml) {
                logger('poller: received xml : ' . $xml, LOGGER_DATA);
-                       if((! strstr($xml,'<?xml')) && (! strstr($xml,'<rss'))) {
+               if((! strstr($xml,'<?xml')) && (! strstr($xml,'<rss'))) {
                        logger('poller: post_handshake: response from ' . $url . ' did not contain XML.');
                        $r = q("UPDATE `contact` SET `last-update` = '%s' WHERE `id` = %d LIMIT 1",
                                dbesc(datetime_convert()),