From fb198b8a058b7a9f4a1730a7cb44c3aeac745925 Mon Sep 17 00:00:00 2001 From: marijus Date: Fri, 13 Feb 2015 10:01:26 +0100 Subject: item_unseen update --- include/attach.php | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/attach.php b/include/attach.php index 3350a591e..f973102e8 100644 --- a/include/attach.php +++ b/include/attach.php @@ -1082,6 +1082,7 @@ function file_activity($channel_id, $object, $allow_cid, $allow_gid, $deny_cid, $arr['mid'] = $mid; $arr['parent_mid'] = $mid; $arr['item_flags'] = $item_flags; + $arr['item_unseen'] = 1; $arr['author_xchan'] = $poster['xchan_hash']; $arr['owner_xchan'] = $poster['xchan_hash']; $arr['title'] = ''; -- cgit v1.2.3 From 8696795ce69ee50c7a4e63f5a7e740de466f5df6 Mon Sep 17 00:00:00 2001 From: Alexandre Hannud Abdo Date: Fri, 13 Feb 2015 06:54:49 -0200 Subject: Fixes tag delivery regex for when multiple tags are present Previous regex would cause matches to span several tags when present, thus never recognizing the mention. --- include/items.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/items.php b/include/items.php index 717a4bf71..18ce149ed 100755 --- a/include/items.php +++ b/include/items.php @@ -2861,7 +2861,7 @@ function tag_deliver($uid,$item_id) { if(preg_match($pattern,$body,$matches)) $tagged = true; - $pattern = '/@\!?\[zrl\=(.*?)\](.*?)\+\[\/zrl\]/'; + $pattern = '/@\!?\[zrl\=([^\]]*?)\]((?:.(?!\[zrl\=))*?)\+\[\/zrl\]/'; if(preg_match_all($pattern,$body,$matches,PREG_SET_ORDER)) { $max_forums = get_config('system','max_tagged_forums'); @@ -3022,7 +3022,7 @@ function tgroup_check($uid,$item) { // $pattern = '/@\!?\[zrl\=' . preg_quote($term['url'],'/') . '\]' . preg_quote($term['term'] . '+','/') . '\[\/zrl\]/'; - $pattern = '/@\!?\[zrl\=(.*?)\](.*?)\+\[\/zrl\]/'; + $pattern = '/@\!?\[zrl\=([^\]]*?)\]((?:.(?!\[zrl\=))*?)\+\[\/zrl\]/'; $found = false; -- cgit v1.2.3