]> git.mxchange.org Git - friendica-addons.git/blobdiff - privacy_image_cache/privacy_image_cache.php
Setting "editplain", "page" and "privacy_image_cache" as deprecated. Using new cache...
[friendica-addons.git] / privacy_image_cache / privacy_image_cache.php
index a0cd81073a6013ae392ae47d1278919f0b8def91..8a303e7b069f14afa0adfe1eb468bbadf22e735b 100644 (file)
@@ -4,6 +4,7 @@
  * Name: Privacy Image Cache
  * Version: 0.1
  * Author: Tobias Hößl <https://github.com/CatoTH/>
+ * Status: Unsupported
  */
 
 define("PRIVACY_IMAGE_CACHE_DEFAULT_TIME", 86400); // 1 Day
@@ -156,7 +157,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);
@@ -307,8 +308,8 @@ function privacy_image_cache_img_cb($matches) {
                $matches[2] = urldecode($queryvar['url']);
 
        // if fetching facebook pictures don't fetch the thumbnail but the big one
-       if (((strpos($matches[2], ".fbcdn.net/") OR strpos($matches[2], "/fbcdn-photos-"))) and (substr($matches[2], -6) == "_s.jpg"))
-               $matches[2] = substr($matches[2], 0, -6)."_n.jpg";
+       //if (((strpos($matches[2], ".fbcdn.net/") OR strpos($matches[2], "/fbcdn-photos-"))) and (substr($matches[2], -6) == "_s.jpg"))
+       //      $matches[2] = substr($matches[2], 0, -6)."_n.jpg";
 
        // following line changed per bug #431
        if (privacy_image_cache_is_local_image($matches[2]))