Facebook: Better check for empty posts, performance improvement when syncing.
This commit is contained in:
parent
96df32ce35
commit
bc8345d596
|
@ -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);
|
||||||
|
|
|
@ -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);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user