]> git.mxchange.org Git - friendica-addons.git/blobdiff - twitter/twitter.php
The tempory path is now fetched from a new function (that ensures that the value...
[friendica-addons.git] / twitter / twitter.php
index 6e98888b0c97772396bc9ca40ba88adb427fd7ce..b6d0d3af312d05c050ab1a5ddfe7125b44297572 100644 (file)
@@ -479,7 +479,7 @@ function twitter_post_hook(&$a,&$b) {
                if(strlen($msg) and ($image != "")) {
                        $img_str = fetch_url($image);
 
-                       $tempfile = tempnam(get_config("system","temppath"), "cache");
+                       $tempfile = tempnam(get_temppath(), "cache");
                        file_put_contents($tempfile, $img_str);
 
                        // Twitter had changed something so that the old library doesn't work anymore
@@ -1075,7 +1075,7 @@ function twitter_expand_entities($a, $body, $item, $no_tags = false, $picture) {
                                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);