Continued a bit:
- converted multiple single-line comments into one multi-line comment - added spaces (space-time!) Signed-off-by: Roland Haeder <roland@mxchange.org>
This commit is contained in:
parent
07a0d300c3
commit
44a137a8de
1 changed files with 9 additions and 7 deletions
16
mod/item.php
16
mod/item.php
|
@ -1201,9 +1201,9 @@ function handle_tag(App $a, &$body, &$inform, &$str_tags, $profile_uid, $tag, $n
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$r = false;
|
$r = false;
|
||||||
if (strrpos($name,'+')) {
|
if (strrpos($name, '+')) {
|
||||||
// Is it in format @nick+number?
|
// Is it in format @nick+number?
|
||||||
$tagcid = intval(substr($name,strrpos($name,'+') + 1));
|
$tagcid = intval(substr($name, strrpos($name, '+') + 1));
|
||||||
|
|
||||||
$r = q("SELECT `id`, `url`, `nick`, `name`, `alias`, `network` FROM `contact` WHERE `id` = %d AND `uid` = %d LIMIT 1",
|
$r = q("SELECT `id`, `url`, `nick`, `name`, `alias`, `network` FROM `contact` WHERE `id` = %d AND `uid` = %d LIMIT 1",
|
||||||
intval($tagcid),
|
intval($tagcid),
|
||||||
|
@ -1276,18 +1276,20 @@ function handle_tag(App $a, &$body, &$inform, &$str_tags, $profile_uid, $tag, $n
|
||||||
$newtag = '@[url='.$profile.']'.$newname.'[/url]';
|
$newtag = '@[url='.$profile.']'.$newname.'[/url]';
|
||||||
$body = str_replace('@'.$name, $newtag, $body);
|
$body = str_replace('@'.$name, $newtag, $body);
|
||||||
// append tag to str_tags
|
// append tag to str_tags
|
||||||
if (! stristr($str_tags,$newtag)) {
|
if (! stristr($str_tags, $newtag)) {
|
||||||
if (strlen($str_tags)) {
|
if (strlen($str_tags)) {
|
||||||
$str_tags .= ',';
|
$str_tags .= ',';
|
||||||
}
|
}
|
||||||
$str_tags .= $newtag;
|
$str_tags .= $newtag;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Status.Net seems to require the numeric ID URL in a mention if the person isn't
|
/*
|
||||||
// subscribed to you. But the nickname URL is OK if they are. Grrr. We'll tag both.
|
* Status.Net seems to require the numeric ID URL in a mention if the person isn't
|
||||||
|
* subscribed to you. But the nickname URL is OK if they are. Grrr. We'll tag both.
|
||||||
|
*/
|
||||||
if (strlen($alias)) {
|
if (strlen($alias)) {
|
||||||
$newtag = '@[url='.$alias.']'.$newname.'[/url]';
|
$newtag = '@[url=' . $alias . ']' . $newname . '[/url]';
|
||||||
if (! stristr($str_tags,$newtag)) {
|
if (! stristr($str_tags, $newtag)) {
|
||||||
if (strlen($str_tags)) {
|
if (strlen($str_tags)) {
|
||||||
$str_tags .= ',';
|
$str_tags .= ',';
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue