aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexandre Hannud Abdo <abdo@member.fsf.org>2014-05-21 17:23:18 -0300
committerAlexandre Hannud Abdo <abdo@member.fsf.org>2014-05-21 17:23:18 -0300
commit6fb8cd4d24902af1c861c1ee242ea2e86b1eee68 (patch)
tree26886e6e7986225bfee907a742a5868af8fef9d0
parent3e75f9cbb1c74cb140f07b92627101d774724a80 (diff)
downloadvolse-hubzilla-6fb8cd4d24902af1c861c1ee242ea2e86b1eee68.tar.gz
volse-hubzilla-6fb8cd4d24902af1c861c1ee242ea2e86b1eee68.tar.bz2
volse-hubzilla-6fb8cd4d24902af1c861c1ee242ea2e86b1eee68.zip
Make tag delivery work when channel name differs from profile name
-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');