From a6d8c3193a6fc243f3e516118c793e5b871b8247 Mon Sep 17 00:00:00 2001 From: friendica Date: Mon, 3 Nov 2014 14:49:03 -0800 Subject: various UI issues related to having an enormous number of entries in the posted_date selector including years/months that had no posts --- include/items.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'include/items.php') diff --git a/include/items.php b/include/items.php index d173e1a98..325947341 100755 --- a/include/items.php +++ b/include/items.php @@ -4128,10 +4128,13 @@ function first_post_date($uid,$wall = false) { * current flat list of all representative dates. */ -function list_post_dates($uid,$wall) { +function list_post_dates($uid,$wall,$mindate) { $dnow = datetime_convert('',date_default_timezone_get(),'now','Y-m-d'); - $dthen = first_post_date($uid,$wall); + if($mindate) + $dthen = datetime_convert('',date_default_timezone_get(),$mindate); + else + $dthen = first_post_date($uid,$wall); if(! $dthen) return array(); -- cgit v1.2.3 From 55f64c37364a1e4ac3e57a6af2953df196589c49 Mon Sep 17 00:00:00 2001 From: friendica Date: Fri, 7 Nov 2014 13:06:56 -0800 Subject: tgroup_check - decrypt if obscured before checking body text for reshares --- include/items.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'include/items.php') diff --git a/include/items.php b/include/items.php index 325947341..7e2bb4f18 100755 --- a/include/items.php +++ b/include/items.php @@ -2974,7 +2974,15 @@ function tgroup_check($uid,$item) { // At this point we've determined that the person receiving this post was mentioned in it. // Now let's check if this mention was inside a reshare so we don't spam a forum - $body = preg_replace('/\[share(.*?)\[\/share\]/','',$item['body']); + + $body = $item['body']; + + if(array_key_exists('item_flags',$item) && ($item['item_flags'] & ITEM_OBSCURED) && $body) { + $key = get_config('system','prvkey'); + $body = crypto_unencapsulate(json_decode($body,true),$key); + } + + $body = preg_replace('/\[share(.*?)\[\/share\]/','',$body); $pattern = '/@\!?\[zrl\=' . preg_quote($term['url'],'/') . '\]' . preg_quote($term['term'] . '+','/') . '\[\/zrl\]/'; -- cgit v1.2.3