]> git.mxchange.org Git - friendica.git/commitdiff
Fix a missing variable
authorMichael <heluecht@pirati.ca>
Fri, 28 Jun 2019 02:46:56 +0000 (02:46 +0000)
committerMichael <heluecht@pirati.ca>
Fri, 28 Jun 2019 02:46:56 +0000 (02:46 +0000)
src/Worker/OnePoll.php

index eb00447d3993c40db5beeef7bcb726a6d5ffd850..dccf248c6ba653cd5f0c75850e9ed30906b4c890 100644 (file)
@@ -125,11 +125,6 @@ class OnePoll
                        $hub_update = false;
                }
 
-               $last_update = (($contact['last-update'] <= DBA::NULL_DATETIME)
-                       ? DateTimeFormat::utc('now - 7 days', DateTimeFormat::ATOM)
-                       : DateTimeFormat::utc($contact['last-update'], DateTimeFormat::ATOM)
-               );
-
                Logger::log("poll: ({$protocol}-{$contact['id']}) IMPORTER: {$importer['name']}, CONTACT: {$contact['name']}");
 
                $xml = '';
@@ -260,6 +255,11 @@ class OnePoll
                        DBA::update('contact', $fields, ['id' => $contact['id']]);
                }
 
+               $last_update = (($contact['last-update'] <= DBA::NULL_DATETIME)
+                       ? DateTimeFormat::utc('now - 7 days', DateTimeFormat::ATOM)
+                       : DateTimeFormat::utc($contact['last-update'], DateTimeFormat::ATOM)
+               );
+
                $url = $contact['poll'] . '?dfrn_id=' . $idtosend
                        . '&dfrn_version=' . DFRN_PROTOCOL_VERSION
                        . '&type=data&last_update=' . $last_update