From 0ae83e41a294b31df76feebdd9aabb80bec059b8 Mon Sep 17 00:00:00 2001 From: Matthew Exon Date: Mon, 25 Jan 2016 10:32:31 +0100 Subject: [PATCH] Use get_temppath() instead of hard-coded '/tmp' to store cookiejar --- include/Scrape.php | 4 ++-- include/onepoll.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/Scrape.php b/include/Scrape.php index 732948981..ca6489b16 100644 --- a/include/Scrape.php +++ b/include/Scrape.php @@ -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); diff --git a/include/onepoll.php b/include/onepoll.php index 5ebafb353..a9ca19533 100644 --- a/include/onepoll.php +++ b/include/onepoll.php @@ -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); }