Use get_temppath() instead of hard-coded '/tmp' to store cookiejar
This commit is contained in:
parent
4007876b84
commit
0ae83e41a2
2 changed files with 3 additions and 3 deletions
|
@ -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);
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue