From 40ce1054b77fc4df2c9840ffdf04bb32b35996c0 Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Thu, 12 Apr 2012 16:39:36 +0200 Subject: [PATCH] Facebook: Images weren't posted in some cases --- facebook/facebook.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/facebook/facebook.php b/facebook/facebook.php index b6e40654..6b9ee736 100755 --- a/facebook/facebook.php +++ b/facebook/facebook.php @@ -558,6 +558,9 @@ function facebook_content(&$a) { function facebook_cron($a,$b) { +//del_config('facebook', 'realtime_active'); +//del_config('facebook', 'realtime_err_mailsent'); +//del_config('facebook', 'cb_verify_token'); $last = get_config('facebook','last_poll'); @@ -896,7 +899,7 @@ function facebook_post_hook(&$a,&$b) { if(preg_match("/\[img\=([0-9]*)x([0-9]*)\](.*?)\[\/img\]/is",$b['body'],$matches)) $image = $matches[3]; - if ($image != '') + if ($image == '') if(preg_match("/\[img\](.*?)\[\/img\]/is",$b['body'],$matches)) $image = $matches[1]; @@ -1436,8 +1439,8 @@ function fb_consume_stream($uid,$j,$wall = false) { // $datarray['body'] = $entry->story; // Adding the "story" text to see if there are useful data in it (testing) - //if (($datarray['app'] != "Events") and $entry->story) - // $datarray['body'] .= "\n".$entry->story; + if (($datarray['app'] != "Events") and $entry->story) + $datarray['body'] .= "\n".$entry->story; if(trim($datarray['body']) == '') { logger('facebook: empty body '.$entry->id.' '.print_r($entry, true)); -- 2.39.5