mirror of
https://git.friendi.ca/friendica/friendica.git
synced 2025-06-17 00:45:14 +02:00
Bugfix: The contact names had to be escaped
This commit is contained in:
parent
1f0b759e2f
commit
61c3ce7a21
11 changed files with 64 additions and 44 deletions
|
@ -1287,11 +1287,24 @@ function item_store($arr,$force_parent = false, $notify = false, $dontcache = fa
|
|||
}
|
||||
|
||||
if ($arr['network'] == "") {
|
||||
$r = q("SELECT `network` FROM `contact` WHERE `id` = %d AND `uid` = %d LIMIT 1",
|
||||
intval($arr['contact-id']),
|
||||
$r = q("SELECT `network` FROM `contact` WHERE `network` IN ('%s', '%s', '%s') AND `nurl` = '%s' AND `uid` = %d LIMIT 1",
|
||||
dbesc(NETWORK_DFRN), dbesc(NETWORK_DIASPORA), dbesc(NETWORK_OSTATUS),
|
||||
dbesc(normalise_link($arr['author-link'])),
|
||||
intval($arr['uid'])
|
||||
);
|
||||
|
||||
if(!count($r))
|
||||
$r = q("SELECT `network` FROM `gcontact` WHERE `network` IN ('%s', '%s', '%s') AND `nurl` = '%s' LIMIT 1",
|
||||
dbesc(NETWORK_DFRN), dbesc(NETWORK_DIASPORA), dbesc(NETWORK_OSTATUS),
|
||||
dbesc(normalise_link($arr['author-link']))
|
||||
);
|
||||
|
||||
if(!count($r))
|
||||
$r = q("SELECT `network` FROM `contact` WHERE `id` = %d AND `uid` = %d LIMIT 1",
|
||||
intval($arr['contact-id']),
|
||||
intval($arr['uid'])
|
||||
);
|
||||
|
||||
if(count($r))
|
||||
$arr['network'] = $r[0]["network"];
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue