From: Michael Vogel Date: Sun, 12 Jul 2015 09:19:40 +0000 (+0200) Subject: Some precaution to avoid overwriting of existing data with blanks X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=0ac75deee158aa8f985d5275824ed283a0bca236;p=friendica.git Some precaution to avoid overwriting of existing data with blanks --- diff --git a/include/follow.php b/include/follow.php index b2b6c75027..62180e4c61 100644 --- a/include/follow.php +++ b/include/follow.php @@ -1,7 +1,12 @@ $val) + if (isset($r[0][$key]) AND ($r[0][$key] != "") AND ($val == "")) + $ret[$key] = $r[0][$key]; + q("UPDATE `contact` SET `url` = '%s', `nurl` = '%s', `addr` = '%s', `alias` = '%s', `batch` = '%s', `notify` = '%s', `poll` = '%s', `poco` = '%s', `name` = '%s', `nick` = '%s' WHERE `id` = %d", dbesc($ret['url']), dbesc(normalise_link($ret['url'])), diff --git a/include/items.php b/include/items.php index c61ad1b1e2..8fd1cbcb48 100644 --- a/include/items.php +++ b/include/items.php @@ -2076,7 +2076,7 @@ function dfrn_deliver($owner,$contact,$atom, $dissolve = false) { $final_dfrn_id = substr($final_dfrn_id,2); if($final_dfrn_id != $orig_id) { - logger('dfrn_deliver: wrong dfrn_id. Original: '.$orig_id.' Target: '.$final_dfrn_id.' Test: '.$test); + logger('dfrn_deliver: wrong dfrn_id.'); // did not decode properly - cannot trust this site return 3; } diff --git a/object/Item.php b/object/Item.php index 3211048cef..fcc5ea3dca 100644 --- a/object/Item.php +++ b/object/Item.php @@ -308,6 +308,9 @@ class Item extends BaseObject { if (($item["item_network"] == NETWORK_FACEBOOK) AND ($indent == 'comment') AND isset($buttons["like"])) unset($buttons["like"]); + // Likes don't federate at OStatus + if (($item["item_network"] == NETWORK_OSTATUS) AND isset($buttons["like"])) + unset($buttons["like"]); $tmp_item = array( 'template' => $this->get_template(),