From 21fc3c60d478db88b251599ee984e363e0c39bf8 Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Sun, 14 Feb 2016 15:05:43 +0100 Subject: [PATCH] We now show the correct platform (redmatrix or hubzilla) --- include/contact_selectors.php | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/include/contact_selectors.php b/include/contact_selectors.php index f104866232..a884a6b52b 100644 --- a/include/contact_selectors.php +++ b/include/contact_selectors.php @@ -99,8 +99,16 @@ function network_to_name($s, $profile = "") { $networkname = str_replace($search,$replace,$s); - if (($s == NETWORK_DIASPORA) AND ($profile != "") AND diaspora_is_redmatrix($profile)) - $networkname = t("Redmatrix"); + if (($s == NETWORK_DIASPORA) AND ($profile != "") AND diaspora_is_redmatrix($profile)) { + $networkname = t("Hubzilla/Redmatrix"); + + $r = q("SELECT `gserver`.`platform` FROM `gcontact` + INNER JOIN `gserver` ON `gserver`.`nurl` = `gcontact`.`server_url` + WHERE `gcontact`.`nurl` = '%s' AND `platform` != ''", + dbesc(normalise_link($profile))); + if ($r) + $networkname = $r[0]["platform"]; + } return $networkname; } -- 2.39.5