allow tagging of people by name or nickname
This commit is contained in:
parent
ebabd25717
commit
ce73cd560f
3 changed files with 52 additions and 5 deletions
|
|
@ -101,7 +101,7 @@ function profiles_post(&$a) {
|
|||
}
|
||||
else {
|
||||
$newname = $lookup;
|
||||
if(strstr($lookup,' ')) {
|
||||
/* if(strstr($lookup,' ')) {
|
||||
$r = q("SELECT * FROM `contact` WHERE `name` = '%s' AND `uid` = %d LIMIT 1",
|
||||
dbesc($newname),
|
||||
intval(local_user())
|
||||
|
|
@ -112,6 +112,17 @@ function profiles_post(&$a) {
|
|||
dbesc($lookup),
|
||||
intval(local_user())
|
||||
);
|
||||
}*/
|
||||
|
||||
$r = q("SELECT * FROM `contact` WHERE `name` = '%s' AND `uid` = %d LIMIT 1",
|
||||
dbesc($newname),
|
||||
intval(local_user())
|
||||
);
|
||||
if(! $r) {
|
||||
$r = q("SELECT * FROM `contact` WHERE `nick` = '%s' AND `uid` = %d LIMIT 1",
|
||||
dbesc($lookup),
|
||||
intval(local_user())
|
||||
);
|
||||
}
|
||||
if(count($r)) {
|
||||
$prf = $r[0]['url'];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue