]> git.mxchange.org Git - friendica.git/blobdiff - include/onepoll.php
Merge pull request #2336 from stieben/move-div-pause
[friendica.git] / include / onepoll.php
index 6ff7eae422e35063b1746d334cccc836a8fbeb76..6fb191f73da534dff3230ac9692848a9dd897d68 100644 (file)
@@ -27,7 +27,6 @@ function onepoll_run(&$argv, &$argc){
 
        require_once('include/session.php');
        require_once('include/datetime.php');
-       require_once('library/simplepie/simplepie.inc');
        require_once('include/items.php');
        require_once('include/Contact.php');
        require_once('include/email.php');
@@ -109,9 +108,8 @@ function onepoll_run(&$argv, &$argc){
                                poco_load($contact['id'],$importer_uid,0,$contact['poco']);
        }
 
-       // To-Do:
-       // - Check why we don't poll the Diaspora feed at the moment (some guid problem in the items?)
-       // - Check whether this is possible with Redmatrix
+       /// @TODO Check why we don't poll the Diaspora feed at the moment (some guid problem in the items?)
+       /// @TODO Check whether this is possible with Redmatrix
        if ($contact["network"] == NETWORK_DIASPORA) {
                if (poco_do_update($contact["created"], $contact["last-item"], $contact["failure_update"], $contact["success_update"])) {
                        $last_updated = poco_last_updated($contact["url"]);
@@ -336,7 +334,9 @@ function onepoll_run(&$argv, &$argc){
                if($contact['rel'] == CONTACT_IS_FOLLOWER || $contact['blocked'] || $contact['readonly'])
                        return;
 
-               $xml = fetch_url($contact['poll']);
+               $cookiejar = tempnam(get_temppath(), 'cookiejar-onepoll-');
+               $xml = fetch_url($contact['poll'], false, $redirects, 0, Null, $cookiejar);
+               unlink($cookiejar);
        }
        elseif($contact['network'] === NETWORK_MAIL || $contact['network'] === NETWORK_MAIL2) {
 
@@ -507,7 +507,7 @@ function onepoll_run(&$argv, &$argc){
                                                logger("Mail: Importing ".$msg_uid." for ".$mailconf[0]['user']);
 
                                                // some mailing lists have the original author as 'from' - add this sender info to msg body.
-                                               // todo: adding a gravatar for the original author would be cool
+                                               /// @TODO Adding a gravatar for the original author would be cool
 
                                                if(! stristr($meta->from,$contact['addr'])) {
                                                        $from = imap_mime_header_decode($meta->from);