X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=include%2Fcontact_selectors.php;h=05059e3358abcfc92170569b8905979ddf4bb606;hb=96501bda816bb3db29ea19d89e6ffc0e83f350b3;hp=7069af066409164984c824313174e8ae2f16f292;hpb=0811f9257ef3ee032c9ad307c96a626c76239e2a;p=friendica.git diff --git a/include/contact_selectors.php b/include/contact_selectors.php index 7069af0664..05059e3358 100644 --- a/include/contact_selectors.php +++ b/include/contact_selectors.php @@ -100,13 +100,13 @@ function network_to_name($s, $profile = "") { $networkname = str_replace($search, $replace, $s); - if ((in_array($s, array(NETWORK_DFRN, NETWORK_DIASPORA, NETWORK_OSTATUS))) AND ($profile != "")) { - $r = q("SELECT `gserver`.`platform` FROM `gcontact` + if ((in_array($s, array(NETWORK_DFRN, NETWORK_DIASPORA, NETWORK_OSTATUS))) && ($profile != "")) { + $r = dba::fetch_first("SELECT `gserver`.`platform` FROM `gcontact` INNER JOIN `gserver` ON `gserver`.`nurl` = `gcontact`.`server_url` - WHERE `gcontact`.`nurl` = '%s' AND `platform` != ''", - dbesc(normalise_link($profile))); + WHERE `gcontact`.`nurl` = ? AND `platform` != ''", normalise_link($profile)); + if (dbm::is_result($r)) { - $networkname = $r[0]["platform"]; + $networkname = $r['platform']; } }