]> git.mxchange.org Git - friendica.git/commitdiff
Use get_temppath() instead of hard-coded '/tmp' to store cookiejar
authorMatthew Exon <github.mexon@spamgourmet.com>
Mon, 25 Jan 2016 09:32:31 +0000 (10:32 +0100)
committerMatthew Exon <github.mexon@spamgourmet.com>
Mon, 25 Jan 2016 09:38:30 +0000 (10:38 +0100)
include/Scrape.php
include/onepoll.php

index 7329489817eb5e928331352bd1a2cd348fbde838..ca6489b16ad37255311c4b327442824552413ac4 100644 (file)
@@ -235,7 +235,7 @@ function scrape_feed($url) {
        $a = get_app();
 
        $ret = array();
-       $cookiejar = tempnam('/tmp', 'cookiejar-scrape-feed-');
+       $cookiejar = tempnam(get_temppath(), 'cookiejar-scrape-feed-');
        $s = fetch_url($url, false, $redirects, 0, Null, $cookiejar);
        unlink($cookiejar);
 
@@ -664,7 +664,7 @@ function probe_url($url, $mode = PROBE_NORMAL, $level = 1) {
                                $vcard['photo'] = $feedret['photo'];
                        require_once('library/simplepie/simplepie.inc');
                        $feed = new SimplePie();
-                       $cookiejar = tempnam('/tmp', 'cookiejar-scrape-feed-');
+                       $cookiejar = tempnam(get_temppath(), 'cookiejar-scrape-feed-');
                        $xml = fetch_url($poll, false, $redirects, 0, Null, $cookiejar);
                        unlink($cookiejar);
 
index 5ebafb353e95323b33a40d34a2a25e10a01078e4..a9ca195332cecff33ba93a265b5845b70d7be068 100644 (file)
@@ -335,7 +335,7 @@ function onepoll_run(&$argv, &$argc){
                if($contact['rel'] == CONTACT_IS_FOLLOWER || $contact['blocked'] || $contact['readonly'])
                        return;
 
-               $cookiejar = tempnam('/tmp', 'cookiejar-onepoll-');
+               $cookiejar = tempnam(get_temppath(), 'cookiejar-onepoll-');
                $xml = fetch_url($contact['poll'], false, $redirects, 0, Null, $cookiejar);
                unlink($cookiejar);
        }