1
0
Fork 0

if no FB image and fb link is on our site, use Friendika logo for fb image. Otherwise it's going to end up being a random friend.

This commit is contained in:
Friendika 2011-05-22 21:20:28 -07:00
parent 576f8eda08
commit 5996e2cd4c
2 changed files with 7 additions and 1 deletions

View file

@ -499,7 +499,8 @@ function facebook_post_hook(&$a,&$b) {
$msg = preg_replace("/\[img\](.+?)\[\/img\]/is", t('Image: ') . '$1', $msg);
if((strpos($link,$a->get_baseurl()) !== false) && (! $image))
$image = $a->get_baseurl() . '/images/friendika-64.jpg';
$msg = trim(strip_tags(bbcode($msg)));
$msg = html_entity_decode($msg,ENT_QUOTES,'UTF-8');

View file

@ -91,6 +91,11 @@ function pubsub_post(&$a) {
logger('pubsub: user-agent: ' . $_SERVER['HTTP_USER_AGENT'] );
logger('pubsub: data: ' . $xml, LOGGER_DATA);
if(! stristr($xml,'<?xml')) {
logger('pubsub_post: bad xml');
hub_post_return();
}
$nick = (($a->argc > 1) ? notags(trim($a->argv[1])) : '');
$contact_id = (($a->argc > 2) ? intval($a->argv[2]) : 0 );