]> git.mxchange.org Git - friendica-addons.git/commitdiff
bug #431
authorfriendica <info@friendica.com>
Wed, 23 May 2012 22:43:35 +0000 (15:43 -0700)
committerfriendica <info@friendica.com>
Wed, 23 May 2012 22:43:35 +0000 (15:43 -0700)
privacy_image_cache.tgz [new file with mode: 0644]
privacy_image_cache/privacy_image_cache.php

diff --git a/privacy_image_cache.tgz b/privacy_image_cache.tgz
new file mode 100644 (file)
index 0000000..38a25ff
Binary files /dev/null and b/privacy_image_cache.tgz differ
index 88958101565683dd5a3577dff5de2d804ce4c773..4e836219c5d76f39b650f33d5507d56863a535bf 100644 (file)
@@ -62,6 +62,7 @@ function privacy_image_cache_init() {
  */
 function privacy_image_cache_is_local_image($url) {
     if ($url[0] == '/') return true;
+       // links normalised - bug #431
     $baseurl = normalise_link(get_app()->get_baseurl());
        $url = normalise_link($url);
     return (substr($url, 0, strlen($baseurl)) == $baseurl);
@@ -72,7 +73,8 @@ function privacy_image_cache_is_local_image($url) {
  * @return string
  */
 function privacy_image_cache_img_cb($matches) {
-    if (privacy_image_cache_is_local_image($matches[2])) return $matches[2];
+       // following line changed per bug #431
+    if (privacy_image_cache_is_local_image($matches[2])) return $matches[1] . $matches[2] . $matches[3];
     return $matches[1] . "/privacy_image_cache/?url=" . escape_tags(addslashes($matches[2])) . $matches[3];
 }