diff options
author | friendica <info@friendica.com> | 2015-01-28 16:06:36 -0800 |
---|---|---|
committer | friendica <info@friendica.com> | 2015-01-28 16:06:36 -0800 |
commit | da842da6839a8feeac4ef1084dce576de34fa874 (patch) | |
tree | 5535e4107e8d9762c20748735948c14c8cbb82ae /include/zot.php | |
parent | f0b900057a63a5c9efb8f35daa05b6c7e79d0adb (diff) | |
parent | 54fd8b21db2d8f3841cf590f88611a1d4f44ce48 (diff) | |
download | volse-hubzilla-da842da6839a8feeac4ef1084dce576de34fa874.tar.gz volse-hubzilla-da842da6839a8feeac4ef1084dce576de34fa874.tar.bz2 volse-hubzilla-da842da6839a8feeac4ef1084dce576de34fa874.zip |
Merge branch 'master' into pocorate
Diffstat (limited to 'include/zot.php')
-rw-r--r-- | include/zot.php | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/include/zot.php b/include/zot.php index 2fcada429..33ac16abf 100644 --- a/include/zot.php +++ b/include/zot.php @@ -1485,7 +1485,7 @@ function process_delivery($sender,$arr,$deliveries,$relay,$public = false,$reque // As a side effect we will also do a preliminary check that we have the top-level-post, otherwise // processing it is pointless. - $r = q("select route from item where mid = '%s' and uid = %d limit 1", + $r = q("select route, id from item where mid = '%s' and uid = %d limit 1", dbesc($arr['parent_mid']), intval($channel['channel_id']) ); @@ -1524,7 +1524,7 @@ function process_delivery($sender,$arr,$deliveries,$relay,$public = false,$reque // sent it to us originally. Ignore it if it came from another source // (with potentially different permissions). // only compare the last hop since it could have arrived at the last location any number of ways. - // Always accept empty routes. + // Always accept empty routes and firehose items (route contains 'undefined') . $existing_route = explode(',', $r[0]['route']); $routes = count($existing_route); @@ -1536,6 +1536,9 @@ function process_delivery($sender,$arr,$deliveries,$relay,$public = false,$reque $last_hop = ''; $last_prior_route = ''; } + + if(in_array('undefined',$existing_route) || $last_hop == 'undefined' || $sender['hash'] == 'undefined') + $last_hop = ''; $current_route = (($arr['route']) ? $arr['route'] . ',' : '') . $sender['hash']; |