aboutsummaryrefslogtreecommitdiffstats
path: root/include/items.php
diff options
context:
space:
mode:
authorRedMatrix <info@friendica.com>2014-05-22 08:49:51 +1000
committerRedMatrix <info@friendica.com>2014-05-22 08:49:51 +1000
commita6602a9871a918702a5ccbcae121920cf959129c (patch)
tree26886e6e7986225bfee907a742a5868af8fef9d0 /include/items.php
parent3e75f9cbb1c74cb140f07b92627101d774724a80 (diff)
parent6fb8cd4d24902af1c861c1ee242ea2e86b1eee68 (diff)
downloadvolse-hubzilla-a6602a9871a918702a5ccbcae121920cf959129c.tar.gz
volse-hubzilla-a6602a9871a918702a5ccbcae121920cf959129c.tar.bz2
volse-hubzilla-a6602a9871a918702a5ccbcae121920cf959129c.zip
Merge pull request #467 from solstag/master
Make tag delivery work when channel name differs from profile name
Diffstat (limited to 'include/items.php')
-rwxr-xr-xinclude/items.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/include/items.php b/include/items.php
index 5aaeb55c0..1c44b7df5 100755
--- a/include/items.php
+++ b/include/items.php
@@ -2438,7 +2438,7 @@ function tag_deliver($uid,$item_id) {
if($terms) {
foreach($terms as $term) {
- if((strcasecmp($term['term'],$u[0]['channel_name']) == 0) && link_compare($term['url'],$link)) {
+ if(link_compare($term['url'],$link)) {
$mention = true;
break;
}
@@ -2474,11 +2474,11 @@ function tag_deliver($uid,$item_id) {
$tagged = false;
$plustagged = false;
- $pattern = '/@\!?\[zrl\=' . preg_quote($term['url'],'/') . '\]' . preg_quote($u[0]['channel_name'],'/') . '\[\/zrl\]/';
+ $pattern = '/@\!?\[zrl\=' . preg_quote($term['url'],'/') . '\]' . preg_quote($term['term'],'/') . '\[\/zrl\]/';
if(preg_match($pattern,$body,$matches))
$tagged = true;
- $pattern = '/@\!?\[zrl\=' . preg_quote($term['url'],'/') . '\]' . preg_quote($u[0]['channel_name'] . '+','/') . '\[\/zrl\]/';
+ $pattern = '/@\!?\[zrl\=' . preg_quote($term['url'],'/') . '\]' . preg_quote($term['term'] . '+','/') . '\[\/zrl\]/';
if(preg_match($pattern,$body,$matches))
$plustagged = true;
@@ -2607,7 +2607,7 @@ function tgroup_check($uid,$item) {
if($terms) {
foreach($terms as $term) {
- if(($term['term'] == $u[0]['channel_name']) && link_compare($term['url'],$link)) {
+ if(link_compare($term['url'],$link)) {
$mention = true;
break;
}
@@ -2625,7 +2625,7 @@ function tgroup_check($uid,$item) {
$body = preg_replace('/\[share(.*?)\[\/share\]/','',$item['body']);
- $pattern = '/@\!?\[zrl\=' . preg_quote($term['url'],'/') . '\]' . preg_quote($u[0]['channel_name'] . '+','/') . '\[\/zrl\]/';
+ $pattern = '/@\!?\[zrl\=' . preg_quote($term['url'],'/') . '\]' . preg_quote($term['term'] . '+','/') . '\[\/zrl\]/';
if(! preg_match($pattern,$body,$matches)) {
logger('tgroup_check: mention was in a reshare - ignoring');