Disable some features

This commit is contained in:
Michael 2016-12-30 22:54:16 +00:00
parent 66902c7956
commit 93666b5a8d

View file

@ -334,7 +334,9 @@ class Item extends BaseObject {
} }
// Disable features that aren't available in several networks // 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); unset($buttons["dislike"],$isevent);
$tagger = ''; $tagger = '';
} }
@ -347,18 +349,12 @@ class Item extends BaseObject {
unset($buttons["like"]); unset($buttons["like"]);
} }
// Disabled for testing purposes // Diaspora isn't able to do likes on comments - but Hubzilla does
/// @todo When Diaspora will pass this information we will remove these lines
// Diaspora isn't able to do likes on comments - but red does if (($item["item_network"] == NETWORK_DIASPORA) AND ($indent == 'comment') AND
//if (($item["item_network"] == NETWORK_DIASPORA) AND ($indent == 'comment') AND !Diaspora::is_redmatrix($item["owner-link"]) AND isset($buttons["like"])) {
// !Diaspora::is_redmatrix($item["owner-link"]) AND isset($buttons["like"])) { unset($buttons["like"]);
// unset($buttons["like"]); }
//}
// Diaspora doesn't has multithreaded comments
//if (($item["item_network"] == NETWORK_DIASPORA) AND ($indent == 'comment')) {
// unset($comment);
//}
// Facebook can like comments - but it isn't programmed in the connector yet. // 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"])) { if (($item["item_network"] == NETWORK_FACEBOOK) AND ($indent == 'comment') AND isset($buttons["like"])) {