]> git.mxchange.org Git - friendica.git/blobdiff - src/Worker/OnePoll.php
Merge pull request #11296 from annando/use-abstract
[friendica.git] / src / Worker / OnePoll.php
index 1b5fdaa343849c115ba6568b0d13d839a5acd43f..fbc00e1d58521b19a0c30efaf72b997b485c63ed 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * @copyright Copyright (C) 2010-2021, the Friendica project
+ * @copyright Copyright (C) 2010-2022, the Friendica project
  *
  * @license GNU AGPL version 3 or any later version
  *
@@ -23,6 +23,7 @@ namespace Friendica\Worker;
 
 use Friendica\Core\Logger;
 use Friendica\Core\Protocol;
+use Friendica\Core\System;
 use Friendica\Database\DBA;
 use Friendica\DI;
 use Friendica\Model\Contact;
@@ -101,7 +102,7 @@ class OnePoll
 
                if ($success) {
                        self::updateContact($contact, ['failed' => 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);
@@ -152,7 +153,7 @@ class OnePoll
                        return false;
                }
 
-               $cookiejar = tempnam(get_temppath(), 'cookiejar-onepoll-');
+               $cookiejar = tempnam(System::getTempPath(), 'cookiejar-onepoll-');
                $curlResult = DI::httpClient()->get($contact['poll'], [HttpClientOptions::COOKIEJAR => $cookiejar]);
                unlink($cookiejar);
 
@@ -316,7 +317,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);