]> git.mxchange.org Git - friendica.git/commitdiff
if no FB image and fb link is on our site, use Friendika logo for fb image. Otherwise...
authorFriendika <info@friendika.com>
Mon, 23 May 2011 04:20:28 +0000 (21:20 -0700)
committerFriendika <info@friendika.com>
Mon, 23 May 2011 04:20:28 +0000 (21:20 -0700)
addon/facebook/facebook.php
mod/pubsub.php

index 83a34c07265e6b7c1c018d3bd900646bb8942e43..9410b73dc9f552baf68171c98de70381ab3619a2 100644 (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');
index 5d8ea2ed76640f7a0a3e329123f17aa8ef961808..f829eb4d98f8882a62dbc3a58637c5db5e8e6e83 100644 (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 );