X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FWorker%2FOnePoll.php;h=66b9851cf2655f9dc8bdd3a38856737db89bd69c;hb=34030a736d5e0aa2195c0f472cf69f863c161d83;hp=a5567841e1609ea880122077368a0144e8e0548e;hpb=63da4a75e9da71a2decebd81b62554457dbd1fb5;p=friendica.git diff --git a/src/Worker/OnePoll.php b/src/Worker/OnePoll.php index a5567841e1..66b9851cf2 100644 --- a/src/Worker/OnePoll.php +++ b/src/Worker/OnePoll.php @@ -1,6 +1,6 @@ false, 'last-update' => $updated, 'success_update' => $updated]); - Contact::unmarkForArchival($contact); + Contact::unmarkForArchival($contact); } else { self::updateContact($contact, ['failed' => true, 'last-update' => $updated, 'failure_update' => $updated]); Contact::markForArchival($contact); @@ -154,7 +155,7 @@ class OnePoll } $cookiejar = tempnam(System::getTempPath(), 'cookiejar-onepoll-'); - $curlResult = DI::httpClient()->get($contact['poll'], [HttpClientOptions::COOKIEJAR => $cookiejar]); + $curlResult = DI::httpClient()->get($contact['poll'], HttpClientAccept::FEED_XML, [HttpClientOptions::COOKIEJAR => $cookiejar]); unlink($cookiejar); if ($curlResult->isTimeout()) { @@ -173,7 +174,7 @@ class OnePoll return false; } - Logger::notice('Consume feed of contact', ['id' => $contact['id'], 'url' => $contact['poll']]); + Logger::notice('Consume feed of contact', ['id' => $contact['id'], 'url' => $contact['poll'], 'Content-Type' => $curlResult->getHeader('Content-Type')]); return !empty(Feed::import($xml, $importer, $contact)); } @@ -317,7 +318,7 @@ class OnePoll $datarray['title'] .= $subpart->text; } } - $datarray['title'] = Strings::escapeTags(trim($datarray['title'])); + $datarray['title'] = trim($datarray['title']); //$datarray['title'] = Strings::escapeTags(trim($meta->subject)); $datarray['created'] = DateTimeFormat::utc($meta->date);