diff options
Diffstat (limited to 'mod/item.php')
-rw-r--r-- | mod/item.php | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/mod/item.php b/mod/item.php index 0e855d54d..2c8704a31 100644 --- a/mod/item.php +++ b/mod/item.php @@ -407,7 +407,17 @@ function item_post(&$a) { else { $newname = $name; $alias = ''; - if(strstr($name,'_') || strstr($name,' ')) { + $tagcid = 0; + if(strrpos($newname,'+')) + $tagcid = intval(substr($newname,strrpos($newname,'+') + 1)); + + if($tagcid) { + $r = q("SELECT * FROM `contact` WHERE `id` = %d AND `uid` = %d LIMIT 1", + intval($tagcid), + intval($profile_uid) + ); + } + elseif(strstr($name,'_') || strstr($name,' ')) { $newname = str_replace('_',' ',$name); $r = q("SELECT * FROM `contact` WHERE `name` = '%s' AND `uid` = %d LIMIT 1", dbesc($newname), |