1
0
Fork 0

Modifed "update" and "insert" function / many changed queries

This commit is contained in:
Michael 2017-08-09 21:12:41 +00:00
commit fce72cbbc8
11 changed files with 66 additions and 123 deletions

View file

@ -101,12 +101,12 @@ function network_to_name($s, $profile = "") {
$networkname = str_replace($search, $replace, $s);
if ((in_array($s, array(NETWORK_DFRN, NETWORK_DIASPORA, NETWORK_OSTATUS))) && ($profile != "")) {
$r = q("SELECT `gserver`.`platform` FROM `gcontact`
$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'];
}
}