From: Michael Vogel Date: Fri, 13 Jul 2012 21:27:00 +0000 (+0200) Subject: facebook: Changing the order which kind of text is taken when there is no message X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=cff32d46c2c03621aaabac3165a5baae67f5f957;p=friendica-addons.git facebook: Changing the order which kind of text is taken when there is no message privacy_image_cache: Workaround when a space is in the url --- diff --git a/facebook/facebook.php b/facebook/facebook.php index 51f1fc84..b9f42859 100644 --- a/facebook/facebook.php +++ b/facebook/facebook.php @@ -1091,13 +1091,13 @@ function facebook_post_hook(&$a,&$b) { // Fallback - if message is empty if(!strlen($msg)) - $msg = $link; + $msg = $linkname; if(!strlen($msg)) - $msg = $image; + $msg = $link; if(!strlen($msg)) - $msg = $linkname; + $msg = $image; // If there is nothing to post then exit if(!strlen($msg)) diff --git a/privacy_image_cache/privacy_image_cache.php b/privacy_image_cache/privacy_image_cache.php index cd8a65f8..b757c783 100644 --- a/privacy_image_cache/privacy_image_cache.php +++ b/privacy_image_cache/privacy_image_cache.php @@ -51,6 +51,9 @@ function privacy_image_cache_init() { } else { require_once("Photo.php"); + // It shouldn't happen but it does - spaces in URL + $_REQUEST['url'] = str_replace(" ", "+", $_REQUEST['url']); + $img_str = fetch_url($_REQUEST['url'],true); $tempfile = tempnam("", "cache");