]> git.mxchange.org Git - friendica-addons.git/commitdiff
Facebook: Better check for empty posts, performance improvement when syncing.
authorMichael Vogel <icarus@dabo.de>
Mon, 22 Dec 2014 22:22:33 +0000 (23:22 +0100)
committerMichael Vogel <icarus@dabo.de>
Mon, 22 Dec 2014 22:22:33 +0000 (23:22 +0100)
fbpost/fbpost.php
fbsync/fbsync.php

index f0b763cd3ece54a3f6e54d135485b2aeb9ded691..7c10d7c3b333511d4765db3db29082eda56d25d4 100644 (file)
@@ -1095,7 +1095,7 @@ function fbpost_fetchwall($a, $uid) {
                        }
 
                        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;
                        }
 
@@ -1115,7 +1115,7 @@ function fbpost_fetchwall($a, $uid) {
                }
 
                if(trim($_REQUEST["body"].$content.$pagedata["text"]) == '') {
-                       logger('facebook: empty body '.$item->id.' '.print_r($item, true));
+                       logger('facebook: empty body '.$item->id.' '.print_r($item, true));
                        continue;
                }
 
@@ -1151,6 +1151,11 @@ function fbpost_fetchwall($a, $uid) {
                                                .' '.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);
                logger('facebook: posting for user '.$uid);
                item_post($a);
index 40a7ef46d470c31efb186544a838c610827b5357..39931d5b42d44acb7225874d875196eaf54085b2 100644 (file)
@@ -1007,7 +1007,7 @@ function fbsync_fetchfeed($a, $uid) {
 
        require_once('include/items.php');
 
-       //if ($last_updated == "")
+       if ($last_updated == "")
                $last_updated = 0;
 
        logger("fbsync_fetchfeed: fetching content for user ".$self_id);