]> git.mxchange.org Git - friendica.git/blobdiff - include/poller.php
theme name cleanup - rename default to loozah, provide sane fallbacks and change...
[friendica.git] / include / poller.php
index 20c84990e0576f99cb8e58fa111cb373eb1b3e3b..1d88fe447fb9e6a018b9b8e076382f7c8ace4ef9 100644 (file)
@@ -239,6 +239,7 @@ function poller_run($argv, $argc){
                        $xml = post_url($contact['poll'],$postvars);
                }
                else {
+
                        // $contact['network'] !== 'dfrn'
 
                        $xml = fetch_url($contact['poll']);
@@ -246,8 +247,14 @@ function poller_run($argv, $argc){
 
                logger('poller: received xml : ' . $xml, LOGGER_DATA);
 
-               if(! strlen($xml))
+               if(! strstr($xml,'<?xml')) {
+                       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()),
+                               intval($contact['id'])
+                       );
                        continue;
+               }
 
                consume_feed($xml,$importer,$contact,$hub,1);
 
@@ -271,8 +278,11 @@ function poller_run($argv, $argc){
                }
 
 
-               $r = q("UPDATE `contact` SET `last-update` = '%s' WHERE `id` = %d LIMIT 1",
-                       dbesc(datetime_convert()),
+               $updated = datetime_convert();
+
+               $r = q("UPDATE `contact` SET `last-update` = '%s', `success_update` = '%s' WHERE `id` = %d LIMIT 1",
+                       dbesc($updated),
+                       dbesc($updated),
                        intval($contact['id'])
                );