From 93666b5a8d292725f6d33fc191de4aa27c1463e1 Mon Sep 17 00:00:00 2001 From: Michael Date: Fri, 30 Dec 2016 22:54:16 +0000 Subject: [PATCH] Disable some features --- object/Item.php | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/object/Item.php b/object/Item.php index 4b3dfd5642..8340009a9b 100644 --- a/object/Item.php +++ b/object/Item.php @@ -334,7 +334,9 @@ class Item extends BaseObject { } // Disable features that aren't available in several networks - if (($item["item_network"] != NETWORK_DFRN) AND isset($buttons["dislike"])) { + + /// @todo Add NETWORK_DIASPORA when it will pass this information + if (!in_array($item["item_network"], array(NETWORK_DFRN)) AND isset($buttons["dislike"])) { unset($buttons["dislike"],$isevent); $tagger = ''; } @@ -347,18 +349,12 @@ class Item extends BaseObject { unset($buttons["like"]); } - // Disabled for testing purposes - - // Diaspora isn't able to do likes on comments - but red does - //if (($item["item_network"] == NETWORK_DIASPORA) AND ($indent == 'comment') AND - // !Diaspora::is_redmatrix($item["owner-link"]) AND isset($buttons["like"])) { - // unset($buttons["like"]); - //} - - // Diaspora doesn't has multithreaded comments - //if (($item["item_network"] == NETWORK_DIASPORA) AND ($indent == 'comment')) { - // unset($comment); - //} + // Diaspora isn't able to do likes on comments - but Hubzilla does + /// @todo When Diaspora will pass this information we will remove these lines + if (($item["item_network"] == NETWORK_DIASPORA) AND ($indent == 'comment') AND + !Diaspora::is_redmatrix($item["owner-link"]) AND isset($buttons["like"])) { + unset($buttons["like"]); + } // Facebook can like comments - but it isn't programmed in the connector yet. if (($item["item_network"] == NETWORK_FACEBOOK) AND ($indent == 'comment') AND isset($buttons["like"])) {