]> git.mxchange.org Git - friendica-addons.git/commitdiff
The tempory path is now fetched from a new function (that ensures that the value...
authorMichael Vogel <icarus@dabo.de>
Mon, 23 Jun 2014 20:35:00 +0000 (22:35 +0200)
committerMichael Vogel <icarus@dabo.de>
Mon, 23 Jun 2014 20:35:00 +0000 (22:35 +0200)
appnet/appnet.php
privacy_image_cache/privacy_image_cache.php
statusnet/codebird.php
statusnet/statusnet.php
twitter/twitter.php

index e375c8d3941d203a5bf50f464c8adf56d4d041e9..52f754371a3e496ebd054472945929a3828c73d4 100644 (file)
@@ -475,7 +475,7 @@ function appnet_send(&$a,&$b) {
 
                if (isset($post["image"])) {
                        $img_str = fetch_url($post['image'],true, $redirects, 10);
-                       $tempfile = tempnam(get_config("system","temppath"), "cache");
+                       $tempfile = tempnam(get_temppath(), "cache");
                        file_put_contents($tempfile, $img_str);
 
                        try {
index a0cd81073a6013ae392ae47d1278919f0b8def91..0a6d8be1de3002614f0d5eef44a6080deb8bb68e 100644 (file)
@@ -156,7 +156,7 @@ function privacy_image_cache_init() {
                $redirects = 0;
                $img_str = fetch_url($_REQUEST['url'],true, $redirects, 10);
 
-               $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);
index 14d231d7f5790da37e8714af72fd1a0a410b85b2..cba5f9360f2cf794f53dc539ba5de2f83aa29d85 100644 (file)
@@ -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);
index b619a0421c5ffac5a6a60b1754e838422f0880f4..7293f882c7202d1094a01ec4e11312b1c1345726 100644 (file)
@@ -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);
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);