mirror of
https://git.friendi.ca/friendica/friendica-addons.git
synced 2024-12-22 19:30:20 +00:00
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
This commit is contained in:
parent
bf4f8f4729
commit
cff32d46c2
2 changed files with 6 additions and 3 deletions
|
@ -1090,15 +1090,15 @@ function facebook_post_hook(&$a,&$b) {
|
|||
}
|
||||
|
||||
// Fallback - if message is empty
|
||||
if(!strlen($msg))
|
||||
$msg = $linkname;
|
||||
|
||||
if(!strlen($msg))
|
||||
$msg = $link;
|
||||
|
||||
if(!strlen($msg))
|
||||
$msg = $image;
|
||||
|
||||
if(!strlen($msg))
|
||||
$msg = $linkname;
|
||||
|
||||
// If there is nothing to post then exit
|
||||
if(!strlen($msg))
|
||||
return;
|
||||
|
|
|
@ -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");
|
||||
|
|
Loading…
Reference in a new issue