mirror of
https://github.com/friendica/friendica
synced 2025-04-27 12:30:11 +00:00
The contact template now displays the address if available
This commit is contained in:
parent
2e81d0a2b3
commit
0f41f35041
13 changed files with 164 additions and 18 deletions
|
@ -198,12 +198,16 @@ function get_contact_details_by_url($url, $uid = -1) {
|
|||
if ($uid == -1)
|
||||
$uid = local_user();
|
||||
|
||||
$r = q("SELECT `url`, `name`, `nick`, `addr`. `photo`, `location`, `about`, `keywords`, `gender`, `community`, `network` FROM `gcontact` WHERE `nurl` = '%s' LIMIT 1",
|
||||
$r = q("SELECT `id` AS `gid`, `url`, `name`, `nick`, `addr`, `photo`, `location`, `about`, `keywords`, `gender`, `community`, `network` FROM `gcontact` WHERE `nurl` = '%s' LIMIT 1",
|
||||
dbesc(normalise_link($url)));
|
||||
|
||||
if ($r)
|
||||
if ($r) {
|
||||
$profile = $r[0];
|
||||
else {
|
||||
|
||||
if ($profile["addr"] == "")
|
||||
proc_run('php',"include/update_gcontact.php", $profile["gid"]);
|
||||
|
||||
} else {
|
||||
$r = q("SELECT `url`, `name`, `nick`, `avatar` AS `photo`, `location`, `about` FROM `unique_contacts` WHERE `url` = '%s'",
|
||||
dbesc(normalise_link($url)));
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue