The tempory path is now fetched from a new function (that ensures that the value is set correctly)
This commit is contained in:
@@ -820,7 +820,7 @@ class CodebirdSN
|
||||
}
|
||||
|
||||
// To-Do
|
||||
$tempfile = tempnam(get_config("system","temppath"), "mimecheck");
|
||||
$tempfile = tempnam(get_temppath(), "mimecheck");
|
||||
file_put_contents($tempfile, $data);
|
||||
$mime = image_type_to_mime_type(exif_imagetype($tempfile));
|
||||
unlink($tempfile);
|
||||
|
||||
@@ -570,7 +570,7 @@ function statusnet_post_hook(&$a,&$b) {
|
||||
|
||||
if ($image != "") {
|
||||
$img_str = fetch_url($image);
|
||||
$tempfile = tempnam(get_config("system","temppath"), "cache");
|
||||
$tempfile = tempnam(get_temppath(), "cache");
|
||||
file_put_contents($tempfile, $img_str);
|
||||
$postdata = array("status" => $msg, "media[]" => $tempfile);
|
||||
} else
|
||||
@@ -1446,7 +1446,7 @@ function statusnet_convertmsg($a, $body, $no_tags = false) {
|
||||
else {
|
||||
$img_str = fetch_url($expanded_url, true, $redirects, 4);
|
||||
|
||||
$tempfile = tempnam(get_config("system","temppath"), "cache");
|
||||
$tempfile = tempnam(get_temppath(), "cache");
|
||||
file_put_contents($tempfile, $img_str);
|
||||
$mime = image_type_to_mime_type(exif_imagetype($tempfile));
|
||||
unlink($tempfile);
|
||||
|
||||
Reference in New Issue
Block a user