Merge pull request #228 from annando/1412-facebook-improvements

Facebook: Better check for empty posts, performance improvement when syncing
This commit is contained in:
tobiasd 2014-12-23 06:57:23 +01:00
commit a4006b5600
2 changed files with 8 additions and 3 deletions

View File

@ -1095,7 +1095,7 @@ function fbpost_fetchwall($a, $uid) {
} }
if(trim($_REQUEST["body"].$content.$pagedata["text"]) == '') { if(trim($_REQUEST["body"].$content.$pagedata["text"]) == '') {
logger('facebook: empty body 2 '.$item->id.' '.print_r($item, true)); logger('facebook: empty body 1 '.$item->id.' '.print_r($item, true));
continue; continue;
} }
@ -1115,7 +1115,7 @@ function fbpost_fetchwall($a, $uid) {
} }
if(trim($_REQUEST["body"].$content.$pagedata["text"]) == '') { if(trim($_REQUEST["body"].$content.$pagedata["text"]) == '') {
logger('facebook: empty body '.$item->id.' '.print_r($item, true)); logger('facebook: empty body 2 '.$item->id.' '.print_r($item, true));
continue; continue;
} }
@ -1151,6 +1151,11 @@ function fbpost_fetchwall($a, $uid) {
.' '.substr($item->place->location->longitude, 0, 8); .' '.substr($item->place->location->longitude, 0, 8);
} }
if(trim($_REQUEST["body"]) == '') {
logger('facebook: empty body 3 '.$item->id.' '.print_r($item, true));
continue;
}
//print_r($_REQUEST); //print_r($_REQUEST);
logger('facebook: posting for user '.$uid); logger('facebook: posting for user '.$uid);
item_post($a); item_post($a);

View File

@ -1007,7 +1007,7 @@ function fbsync_fetchfeed($a, $uid) {
require_once('include/items.php'); require_once('include/items.php');
//if ($last_updated == "") if ($last_updated == "")
$last_updated = 0; $last_updated = 0;
logger("fbsync_fetchfeed: fetching content for user ".$self_id); logger("fbsync_fetchfeed: fetching content for user ".$self_id);