Show real platform names
This commit is contained in:
parent
2952e2b3e4
commit
54f49169d4
1 changed files with 5 additions and 6 deletions
|
@ -88,7 +88,7 @@ function network_to_name($s, $profile = "") {
|
||||||
NETWORK_PUMPIO => t('pump.io'),
|
NETWORK_PUMPIO => t('pump.io'),
|
||||||
NETWORK_TWITTER => t('Twitter'),
|
NETWORK_TWITTER => t('Twitter'),
|
||||||
NETWORK_DIASPORA2 => t('Diaspora Connector'),
|
NETWORK_DIASPORA2 => t('Diaspora Connector'),
|
||||||
NETWORK_STATUSNET => t('GNU Social'),
|
NETWORK_STATUSNET => t('GNU Social Connector'),
|
||||||
NETWORK_PNUT => t('pnut'),
|
NETWORK_PNUT => t('pnut'),
|
||||||
NETWORK_APPNET => t('App.net')
|
NETWORK_APPNET => t('App.net')
|
||||||
);
|
);
|
||||||
|
@ -100,16 +100,15 @@ function network_to_name($s, $profile = "") {
|
||||||
|
|
||||||
$networkname = str_replace($search, $replace, $s);
|
$networkname = str_replace($search, $replace, $s);
|
||||||
|
|
||||||
if (($s == NETWORK_DIASPORA) AND ($profile != "") AND Diaspora::is_redmatrix($profile)) {
|
if ((in_array($s, array(NETWORK_DIASPORA, NETWORK_OSTATUS))) AND ($profile != "")) {
|
||||||
$networkname = t("Hubzilla/Redmatrix");
|
|
||||||
|
|
||||||
$r = q("SELECT `gserver`.`platform` FROM `gcontact`
|
$r = q("SELECT `gserver`.`platform` FROM `gcontact`
|
||||||
INNER JOIN `gserver` ON `gserver`.`nurl` = `gcontact`.`server_url`
|
INNER JOIN `gserver` ON `gserver`.`nurl` = `gcontact`.`server_url`
|
||||||
WHERE `gcontact`.`nurl` = '%s' AND `platform` != ''",
|
WHERE `gcontact`.`nurl` = '%s' AND `platform` != ''",
|
||||||
dbesc(normalise_link($profile)));
|
dbesc(normalise_link($profile)));
|
||||||
if ($r)
|
if (dbm::is_result($r)) {
|
||||||
$networkname = $r[0]["platform"];
|
$networkname = $r[0]["platform"];
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return $networkname;
|
return $networkname;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue